Switch griddy to async_on_remove (#34471)

This commit is contained in:
J. Nick Koston
2020-04-20 13:21:00 -05:00
committed by GitHub
parent ccc818266b
commit 4a788b62d1

View File

@@ -70,8 +70,6 @@ class GriddyPriceSensor(Entity):
async def async_added_to_hass(self):
"""Subscribe to updates."""
self.async_on_remove(
self._coordinator.async_add_listener(self.async_write_ha_state)
async def async_will_remove_from_hass(self):
"""Undo subscription."""
self._coordinator.async_remove_listener(self.async_write_ha_state)
)