Make Roborock listener update thread safe (#116184)

Co-authored-by: J. Nick Koston <nick@koston.org>
pull/116190/head
Luke Lashley 2024-04-25 14:26:11 -04:00 committed by GitHub
parent 316f58404d
commit cc79129587
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -137,4 +137,4 @@ class RoborockCoordinatedEntity(
else:
self.coordinator.roborock_device_info.props.consumable = value
self.coordinator.data = self.coordinator.roborock_device_info.props
self.async_write_ha_state()
self.schedule_update_ha_state()

View File

@ -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(
FILTER_REPLACE_TIME - 743
)