Fix failing state update tests (#23575)
This commit is contained in:
parent
1c4367e5a9
commit
581b16e9fa
2 changed files with 10 additions and 4 deletions
|
@ -86,8 +86,11 @@ async def test_purecool_aiq_update_state(devices, login, hass):
|
|||
device.environmental_state = \
|
||||
DysonEnvironmentalSensorV2State(json.dumps(event))
|
||||
|
||||
callback = device.add_message_listener.call_args_list[2][0][0]
|
||||
callback(device.environmental_state)
|
||||
for call in device.add_message_listener.call_args_list:
|
||||
callback = call[0][0]
|
||||
if type(callback.__self__) == dyson.DysonAirSensor:
|
||||
callback(device.environmental_state)
|
||||
|
||||
await hass.async_block_till_done()
|
||||
fan_state = hass.states.get("air_quality.living_room")
|
||||
attributes = fan_state.attributes
|
||||
|
|
|
@ -680,8 +680,11 @@ async def test_purecool_update_state(devices, login, hass):
|
|||
"osau": "0095", "ancp": "CUST"}}
|
||||
device.state = DysonPureCoolV2State(json.dumps(event))
|
||||
|
||||
callback = device.add_message_listener.call_args_list[3][0][0]
|
||||
callback(device.state)
|
||||
for call in device.add_message_listener.call_args_list:
|
||||
callback = call[0][0]
|
||||
if type(callback.__self__) == dyson.DysonPureCoolDevice:
|
||||
callback(device.state)
|
||||
|
||||
await hass.async_block_till_done()
|
||||
fan_state = hass.states.get("fan.living_room")
|
||||
attributes = fan_state.attributes
|
||||
|
|
Loading…
Add table
Reference in a new issue