Skip to content
Snippets Groups Projects
Unverified Commit 927c2314 authored by Chris Talkington's avatar Chris Talkington Committed by GitHub
Browse files

use async_on_remove for IPP Update Coordinator (#33596)

parent 528c7f48
No related branches found
No related tags found
No related merge requests found
......@@ -168,11 +168,9 @@ class IPPEntity(Entity):
async def async_added_to_hass(self) -> None:
"""Connect to dispatcher listening for entity data notifications."""
self.coordinator.async_add_listener(self.async_write_ha_state)
async def async_will_remove_from_hass(self) -> None:
"""Disconnect from update signal."""
self.coordinator.async_remove_listener(self.async_write_ha_state)
self.async_on_remove(
self.coordinator.async_add_listener(self.async_write_ha_state)
)
async def async_update(self) -> None:
"""Update an IPP entity."""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment