mirror of
https://github.com/home-assistant/core.git
synced 2025-08-18 03:51:51 +02:00
Use async_write_ha_state within async methods
This commit is contained in:
@@ -256,7 +256,7 @@ class DlnaDmrEntity(MediaPlayerEntity):
|
||||
)
|
||||
|
||||
# Device could have been de/re-connected, state probably changed
|
||||
self.schedule_update_ha_state()
|
||||
self.async_write_ha_state()
|
||||
|
||||
async def async_config_update_listener(
|
||||
self, hass: HomeAssistant, entry: config_entries.ConfigEntry
|
||||
@@ -293,7 +293,7 @@ class DlnaDmrEntity(MediaPlayerEntity):
|
||||
_LOGGER.warning("Couldn't (re)connect after config change: %r", err)
|
||||
|
||||
# Device was de/re-connected, state might have changed
|
||||
self.schedule_update_ha_state()
|
||||
self.async_write_ha_state()
|
||||
|
||||
async def _device_connect(self, location: str) -> None:
|
||||
"""Connect to the device now that it's available."""
|
||||
|
Reference in New Issue
Block a user