Remove unnecessary awaits in RainMachine (#32884)

* Remove unnecessary awaits in RainMachine

* Cleanup
This commit is contained in:
Aaron Bach authored and GitHub committed 2020-03-17 07:00:54 -04:00
1 parent abd1909e2b
commit 0c49c8578b
4 files changed
+31 -17

No files matched your search

@@ -455,9 +455,16 @@ class RainMachineEntity(Entity):
@callback
def _update_state(self):
"""Update the state."""
self.async_schedule_update_ha_state(True)
self.update_from_latest_data()
self.async_write_ha_state()
async def async_will_remove_from_hass(self):
"""Disconnect dispatcher listener when removed."""
for handler in self._dispatcher_handlers:
handler()
self._dispatcher_handlers = []
@callback
def update_from_latest_data(self):
"""Update the entity."""
raise NotImplementedError