mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 11:47:06 +00:00
Fix failing state update tests (#23575)
This commit is contained in:
parent
1c4367e5a9
commit
581b16e9fa
@ -86,8 +86,11 @@ async def test_purecool_aiq_update_state(devices, login, hass):
|
|||||||
device.environmental_state = \
|
device.environmental_state = \
|
||||||
DysonEnvironmentalSensorV2State(json.dumps(event))
|
DysonEnvironmentalSensorV2State(json.dumps(event))
|
||||||
|
|
||||||
callback = device.add_message_listener.call_args_list[2][0][0]
|
for call in device.add_message_listener.call_args_list:
|
||||||
|
callback = call[0][0]
|
||||||
|
if type(callback.__self__) == dyson.DysonAirSensor:
|
||||||
callback(device.environmental_state)
|
callback(device.environmental_state)
|
||||||
|
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
fan_state = hass.states.get("air_quality.living_room")
|
fan_state = hass.states.get("air_quality.living_room")
|
||||||
attributes = fan_state.attributes
|
attributes = fan_state.attributes
|
||||||
|
@ -680,8 +680,11 @@ async def test_purecool_update_state(devices, login, hass):
|
|||||||
"osau": "0095", "ancp": "CUST"}}
|
"osau": "0095", "ancp": "CUST"}}
|
||||||
device.state = DysonPureCoolV2State(json.dumps(event))
|
device.state = DysonPureCoolV2State(json.dumps(event))
|
||||||
|
|
||||||
callback = device.add_message_listener.call_args_list[3][0][0]
|
for call in device.add_message_listener.call_args_list:
|
||||||
|
callback = call[0][0]
|
||||||
|
if type(callback.__self__) == dyson.DysonPureCoolDevice:
|
||||||
callback(device.state)
|
callback(device.state)
|
||||||
|
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
fan_state = hass.states.get("fan.living_room")
|
fan_state = hass.states.get("fan.living_room")
|
||||||
attributes = fan_state.attributes
|
attributes = fan_state.attributes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user