Changed to async_schedule_update_ha_state (#12518)

* Changed to async schedule update ha state

* Changed to async schedule update ha state

* Fixed my fetch error

* Added new line at the end
This commit is contained in:
thrawnarn 2018-02-20 00:43:14 +01:00 committed by Paulus Schoutsen
parent f3748cc4fa
commit 722b9ba49b

View File

@ -404,13 +404,13 @@ class BluesoundPlayer(MediaPlayerDevice):
# communication is moved to a separate library
yield from self.force_update_sync_status()
self.schedule_update_ha_state()
self.async_schedule_update_ha_state()
except (asyncio.TimeoutError, ClientError):
self._is_online = False
self._last_status_update = None
self._status = None
self.schedule_update_ha_state()
self.async_schedule_update_ha_state()
_LOGGER.info("Client connection error, marking %s as offline",
self._name)
raise