mirror of https://github.com/home-assistant/core
Fix non-thread-safe operation in roon volume callback (#116475)
This commit is contained in:
parent
963d8d6a76
commit
d524baafd2
|
@ -72,7 +72,6 @@ class RoonEventEntity(EventEntity):
|
||||||
via_device=(DOMAIN, self._server.roon_id),
|
via_device=(DOMAIN, self._server.roon_id),
|
||||||
)
|
)
|
||||||
|
|
||||||
@callback
|
|
||||||
def _roonapi_volume_callback(
|
def _roonapi_volume_callback(
|
||||||
self, control_key: str, event: str, value: int
|
self, control_key: str, event: str, value: int
|
||||||
) -> None:
|
) -> None:
|
||||||
|
@ -88,7 +87,7 @@ class RoonEventEntity(EventEntity):
|
||||||
event = "volume_down"
|
event = "volume_down"
|
||||||
|
|
||||||
self._trigger_event(event)
|
self._trigger_event(event)
|
||||||
self.async_write_ha_state()
|
self.schedule_update_ha_state()
|
||||||
|
|
||||||
async def async_added_to_hass(self) -> None:
|
async def async_added_to_hass(self) -> None:
|
||||||
"""Register volume hooks with the roon api."""
|
"""Register volume hooks with the roon api."""
|
||||||
|
|
Loading…
Reference in New Issue