mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-16 00:34:04 +02:00
Fix test_proactive_adaptation_with_separate_commands (#1158)
This commit is contained in:
parent
69c3e3503c
commit
935b913bc7
1 changed files with 6 additions and 2 deletions
|
|
@ -1602,7 +1602,6 @@ async def test_proactive_adaptation(hass):
|
|||
assert state.attributes[ATTR_COLOR_TEMP_KELVIN] == 3448
|
||||
|
||||
|
||||
# TODO: Breaks since 2024.5.0!
|
||||
async def test_proactive_adaptation_with_separate_commands(hass):
|
||||
"""Validate that a split proactive adaptation yields one additional service call."""
|
||||
switch, _ = await setup_lights_and_switch(
|
||||
|
|
@ -1623,11 +1622,16 @@ async def test_proactive_adaptation_with_separate_commands(hass):
|
|||
},
|
||||
)
|
||||
|
||||
event_context_ids = await _turn_on_and_track_event_contexts(
|
||||
events = await _turn_on_and_track_event_contexts(
|
||||
hass,
|
||||
"test_context",
|
||||
ENTITY_LIGHT_3,
|
||||
return_full_events=True,
|
||||
)
|
||||
# Wait for all adaptation tasks to complete
|
||||
await asyncio.gather(*switch.manager.adaptation_tasks)
|
||||
await hass.async_block_till_done()
|
||||
event_context_ids = [event.context.id for event in events]
|
||||
|
||||
# Expect two service calls
|
||||
assert len(event_context_ids) == 2, event_context_ids
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue