cherry-pick wait for transition stuff

This commit is contained in:
Benjamin Auquite 2023-04-02 23:04:26 -05:00
commit 8b2fcf93be
3 changed files with 122 additions and 68 deletions

View file

@ -777,6 +777,10 @@ async def test_significant_change(hass):
for _ in range(switch.turn_on_off_listener.max_cnt_significant_changes):
await update(force=False)
assert not switch.turn_on_off_listener.manual_control[ENTITY_LIGHT]
# Check that the brightness was not changed since setting it manually
assert (
new_brightness == hass.states.get(ENTITY_LIGHT).attributes[ATTR_BRIGHTNESS]
)
# On next update the light should be marked as manually controlled
await update(force=False)
# TODO: the state should be `bool(manual_control) is True`