Skip to content

Commit

Permalink
Only schedule august activity update when a new activity is seen (#11…
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Feb 10, 2024
1 parent 3441b93 commit a48c1ac
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions homeassistant/components/august/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,11 @@ def async_pubnub_message(
device = self.get_device_detail(device_id)
activities = activities_from_pubnub_message(device, date_time, message)
activity_stream = self.activity_stream
if activities:
activity_stream.async_process_newer_device_activities(activities)
if activities and activity_stream.async_process_newer_device_activities(
activities
):
self.async_signal_device_id_update(device.device_id)
activity_stream.async_schedule_house_id_refresh(device.house_id)
activity_stream.async_schedule_house_id_refresh(device.house_id)

@callback
def async_stop(self) -> None:
Expand Down

0 comments on commit a48c1ac

Please sign in to comment.