Skip to content

Commit

Permalink
fix the test
Browse files Browse the repository at this point in the history
  • Loading branch information
th3w1zard1 committed Apr 10, 2023
1 parent 211a4b3 commit aa9384b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ async def test_state_change_handlers(hass):

# [Config options]:
transition_used = 2
total_events = 5
total_events = 6

async def set_brightness(val: int):
# 'Unsafe' set but we know what we're doing.
Expand Down Expand Up @@ -1090,9 +1090,10 @@ async def update(force: bool = False):
assert switch._alt_detect_method

assert listener.last_state_change.get(ENTITY_LIGHT)
if i == 1:
total_events = 2
assert len(listener.last_state_change[ENTITY_LIGHT]) == total_events
# Timer should be done and reset now.
# This is the assert that I can't fix.
timer = listener.transition_timers.get(ENTITY_LIGHT)
assert not timer or not timer.is_running()

Expand Down

0 comments on commit aa9384b

Please sign in to comment.