Don't reinvent callback handler removal logic in several integ… (#33726)
This commit is contained in:
1 parent
e4ee4cf302
commit
f53dfc4308
10 files changed
+16
-67
No files matched your search
@@ -410,7 +410,6 @@ class RainMachineEntity(Entity):
|
||||
"""Initialize."""
|
||||
self._attrs = {ATTR_ATTRIBUTION: DEFAULT_ATTRIBUTION}
|
||||
self._device_class = None
|
||||
self._dispatcher_handlers = []
|
||||
self._name = None
|
||||
self.rainmachine = rainmachine
|
||||
|
||||
@@ -454,12 +453,6 @@ class RainMachineEntity(Entity):
|
||||
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."""
|
||||
|
||||
Reference in new issue
Block a user