Update yalexs to 6.4.0 (#119987)

This commit is contained in:
J. Nick Koston 2024-06-19 14:11:36 -05:00 committed by GitHub
parent 528422d238
commit d9c7887bbf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 7 additions and 14 deletions

View File

@ -8,12 +8,7 @@ from datetime import datetime, timedelta
from functools import partial from functools import partial
import logging import logging
from yalexs.activity import ( from yalexs.activity import ACTION_DOORBELL_CALL_MISSED, Activity, ActivityType
ACTION_DOORBELL_CALL_MISSED,
SOURCE_PUBNUB,
Activity,
ActivityType,
)
from yalexs.doorbell import DoorbellDetail from yalexs.doorbell import DoorbellDetail
from yalexs.lock import LockDetail, LockDoorStatus from yalexs.lock import LockDetail, LockDoorStatus
from yalexs.manager.const import ACTIVITY_UPDATE_INTERVAL from yalexs.manager.const import ACTIVITY_UPDATE_INTERVAL
@ -175,8 +170,7 @@ class AugustDoorBinarySensor(AugustDescriptionEntity, BinarySensorEntity):
"""Get the latest state of the sensor and update activity.""" """Get the latest state of the sensor and update activity."""
if door_activity := self._get_latest({ActivityType.DOOR_OPERATION}): if door_activity := self._get_latest({ActivityType.DOOR_OPERATION}):
update_lock_detail_from_activity(self._detail, door_activity) update_lock_detail_from_activity(self._detail, door_activity)
# If the source is pubnub the lock must be online since its a live update if door_activity.was_pushed:
if door_activity.source == SOURCE_PUBNUB:
self._detail.set_online(True) self._detail.set_online(True)
if bridge_activity := self._get_latest({ActivityType.BRIDGE_OPERATION}): if bridge_activity := self._get_latest({ActivityType.BRIDGE_OPERATION}):

View File

@ -7,7 +7,7 @@ import logging
from typing import Any from typing import Any
from aiohttp import ClientResponseError from aiohttp import ClientResponseError
from yalexs.activity import SOURCE_PUBNUB, ActivityType, ActivityTypes from yalexs.activity import ActivityType, ActivityTypes
from yalexs.lock import Lock, LockStatus from yalexs.lock import Lock, LockStatus
from yalexs.util import get_latest_activity, update_lock_detail_from_activity from yalexs.util import get_latest_activity, update_lock_detail_from_activity
@ -111,8 +111,7 @@ class AugustLock(AugustEntityMixin, RestoreEntity, LockEntity):
if latest_activity := get_latest_activity( if latest_activity := get_latest_activity(
lock_activity_without_operator, lock_activity lock_activity_without_operator, lock_activity
): ):
if latest_activity.source == SOURCE_PUBNUB: if latest_activity.was_pushed:
# If the source is pubnub the lock must be online since its a live update
self._detail.set_online(True) self._detail.set_online(True)
update_lock_detail_from_activity(detail, latest_activity) update_lock_detail_from_activity(detail, latest_activity)

View File

@ -28,5 +28,5 @@
"documentation": "https://www.home-assistant.io/integrations/august", "documentation": "https://www.home-assistant.io/integrations/august",
"iot_class": "cloud_push", "iot_class": "cloud_push",
"loggers": ["pubnub", "yalexs"], "loggers": ["pubnub", "yalexs"],
"requirements": ["yalexs==6.3.0", "yalexs-ble==2.4.2"] "requirements": ["yalexs==6.4.0", "yalexs-ble==2.4.2"]
} }

View File

@ -2939,7 +2939,7 @@ yalesmartalarmclient==0.3.9
yalexs-ble==2.4.2 yalexs-ble==2.4.2
# homeassistant.components.august # homeassistant.components.august
yalexs==6.3.0 yalexs==6.4.0
# homeassistant.components.yeelight # homeassistant.components.yeelight
yeelight==0.7.14 yeelight==0.7.14

View File

@ -2295,7 +2295,7 @@ yalesmartalarmclient==0.3.9
yalexs-ble==2.4.2 yalexs-ble==2.4.2
# homeassistant.components.august # homeassistant.components.august
yalexs==6.3.0 yalexs==6.4.0
# homeassistant.components.yeelight # homeassistant.components.yeelight
yeelight==0.7.14 yeelight==0.7.14