Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: Add data module #116

Merged
merged 2 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions yalexs/manager/activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@

from aiohttp import ClientError

from yalexs.activity import Activity, ActivityType
from yalexs.api_async import ApiAsync
from yalexs.backports.tasks import create_eager_task
from yalexs.pubnub_async import AugustPubNub
from yalexs.util import get_latest_activity

from ..activity import Activity, ActivityType
from ..api_async import ApiAsync
from ..backports.tasks import create_eager_task
from ..pubnub_async import AugustPubNub
from ..util import get_latest_activity
from .const import ACTIVITY_UPDATE_INTERVAL
from .gateway import Gateway
from .subscriber import SubscriberMixin
Expand Down
6 changes: 6 additions & 0 deletions yalexs/manager/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@
# Activity needs to be checked more frequently as the
# doorbell motion and rings are included here
ACTIVITY_UPDATE_INTERVAL = timedelta(seconds=10)


# Limit battery, online, and hardware updates to hourly
# in order to reduce the number of api requests and
# avoid hitting rate limits
MIN_TIME_BETWEEN_DETAIL_UPDATES = timedelta(hours=24)
Loading
Loading