Skip to content

Commit

Permalink
Fix event hook
Browse files Browse the repository at this point in the history
  • Loading branch information
rgc99 committed Dec 9, 2024
1 parent bff6e51 commit 612a7b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ async def test_volume_class(hass: ha.HomeAssistant, skip_dependencies, skip_hist

def state_change(event: ha.Event) -> ha.Event:
nonlocal event_time
event.time_fired = event_time
event.time_fired_timestamp = event_time.timestamp()
return event

mock.side_effect = state_change
Expand Down Expand Up @@ -249,7 +249,7 @@ def read_data(file: str) -> tuple[datetime, str, str]:

def state_change(event: ha.Event) -> ha.Event:
nonlocal event_time, trackers_processed
event.time_fired = event_time
event.time_fired_timestamp = event_time.timestamp()
trackers_processed += 1
return event

Expand Down

0 comments on commit 612a7b0

Please sign in to comment.