From d9c7887bbf3efd20ca916512f7555ffda352ae64 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 19 Jun 2024 14:11:36 -0500 Subject: [PATCH] Update yalexs to 6.4.0 (#119987) --- homeassistant/components/august/binary_sensor.py | 10 ++-------- homeassistant/components/august/lock.py | 5 ++--- homeassistant/components/august/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 5 files changed, 7 insertions(+), 14 deletions(-) diff --git a/homeassistant/components/august/binary_sensor.py b/homeassistant/components/august/binary_sensor.py index aeeaf9f690c..415b77d3fe9 100644 --- a/homeassistant/components/august/binary_sensor.py +++ b/homeassistant/components/august/binary_sensor.py @@ -8,12 +8,7 @@ from datetime import datetime, timedelta from functools import partial import logging -from yalexs.activity import ( - ACTION_DOORBELL_CALL_MISSED, - SOURCE_PUBNUB, - Activity, - ActivityType, -) +from yalexs.activity import ACTION_DOORBELL_CALL_MISSED, Activity, ActivityType from yalexs.doorbell import DoorbellDetail from yalexs.lock import LockDetail, LockDoorStatus 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.""" if door_activity := self._get_latest({ActivityType.DOOR_OPERATION}): 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.source == SOURCE_PUBNUB: + if door_activity.was_pushed: self._detail.set_online(True) if bridge_activity := self._get_latest({ActivityType.BRIDGE_OPERATION}): diff --git a/homeassistant/components/august/lock.py b/homeassistant/components/august/lock.py index 7aee612aa41..5382c710229 100644 --- a/homeassistant/components/august/lock.py +++ b/homeassistant/components/august/lock.py @@ -7,7 +7,7 @@ import logging from typing import Any 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.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( lock_activity_without_operator, lock_activity ): - if latest_activity.source == SOURCE_PUBNUB: - # If the source is pubnub the lock must be online since its a live update + if latest_activity.was_pushed: self._detail.set_online(True) update_lock_detail_from_activity(detail, latest_activity) diff --git a/homeassistant/components/august/manifest.json b/homeassistant/components/august/manifest.json index d4f82fa0aa1..13658e7401d 100644 --- a/homeassistant/components/august/manifest.json +++ b/homeassistant/components/august/manifest.json @@ -28,5 +28,5 @@ "documentation": "https://www.home-assistant.io/integrations/august", "iot_class": "cloud_push", "loggers": ["pubnub", "yalexs"], - "requirements": ["yalexs==6.3.0", "yalexs-ble==2.4.2"] + "requirements": ["yalexs==6.4.0", "yalexs-ble==2.4.2"] } diff --git a/requirements_all.txt b/requirements_all.txt index 5d54d7d8b04..0eb9a4e8f80 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2939,7 +2939,7 @@ yalesmartalarmclient==0.3.9 yalexs-ble==2.4.2 # homeassistant.components.august -yalexs==6.3.0 +yalexs==6.4.0 # homeassistant.components.yeelight yeelight==0.7.14 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 7c4fa5d1de6..b48af464f60 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -2295,7 +2295,7 @@ yalesmartalarmclient==0.3.9 yalexs-ble==2.4.2 # homeassistant.components.august -yalexs==6.3.0 +yalexs==6.4.0 # homeassistant.components.yeelight yeelight==0.7.14