Remove update on add signalling in Axis integration (#41956)

Minor clean up of the integration
This commit is contained in:
Robert Svensson authored and GitHub committed 2020-10-16 11:54:48 -05:00
1 parent cb60905415
commit 028689d6bd
5 files changed
+12 -4

No files matched your search

+8
View File
@@ -77,6 +77,8 @@ class AxisNetworkDevice:
"""Return the serial number of this device."""
return self.config_entry.unique_id
# Options
@property
def option_events(self):
"""Config entry option defining if platforms based on events should be created."""
@@ -94,6 +96,8 @@ class AxisNetworkDevice:
"""Config entry option defining minimum number of seconds to keep trigger high."""
return self.config_entry.options.get(CONF_TRIGGER_TIME, DEFAULT_TRIGGER_TIME)
# Signals
@property
def signal_reachable(self):
"""Device specific event to signal a change in connection status."""
@@ -109,6 +113,8 @@ class AxisNetworkDevice:
"""Device specific event to signal a change in device address."""
return f"axis_new_address_{self.serial}"
# Callbacks
@callback
def async_connection_status_callback(self, status):
"""Handle signals of device connection status.
@@ -175,6 +181,8 @@ class AxisNetworkDevice:
event = mqtt_json_to_event(message.payload)
self.api.event.process_event(event)
# Setup and teardown methods
async def async_setup(self):
"""Set up the device."""
try: