Make Roborock listener update thread safe (#116184)
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
parent
316f58404d
commit
cc79129587
2 changed files with 2 additions and 1 deletions
|
@ -137,4 +137,4 @@ class RoborockCoordinatedEntity(
|
||||||
else:
|
else:
|
||||||
self.coordinator.roborock_device_info.props.consumable = value
|
self.coordinator.roborock_device_info.props.consumable = value
|
||||||
self.coordinator.data = self.coordinator.roborock_device_info.props
|
self.coordinator.data = self.coordinator.roborock_device_info.props
|
||||||
self.async_write_ha_state()
|
self.schedule_update_ha_state()
|
||||||
|
|
|
@ -89,6 +89,7 @@ async def test_listener_update(
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
await hass.async_block_till_done()
|
||||||
assert hass.states.get("sensor.roborock_s7_maxv_filter_time_left").state == str(
|
assert hass.states.get("sensor.roborock_s7_maxv_filter_time_left").state == str(
|
||||||
FILTER_REPLACE_TIME - 743
|
FILTER_REPLACE_TIME - 743
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue