Axis component support unloading entries (#22692)
* Add support for unloading entries * Improve config entry tests * Improve coverage for device * Remove callback when relevant
This commit is contained in:
parent
dbcdc32f05
commit
60c787c2e6
10 changed files with 192 additions and 70 deletions
|
@ -56,6 +56,11 @@ class AxisCamera(MjpegCamera):
|
|||
self.unsub_dispatcher.append(async_dispatcher_connect(
|
||||
self.hass, self.device.event_reachable, self.update_callback))
|
||||
|
||||
async def async_will_remove_from_hass(self) -> None:
|
||||
"""Disconnect device object when removed."""
|
||||
for unsub_dispatcher in self.unsub_dispatcher:
|
||||
unsub_dispatcher()
|
||||
|
||||
@property
|
||||
def supported_features(self):
|
||||
"""Return supported features."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue