Clean up SimpliSafe device info and sensor creation (#41920)

* Clean up SimpliSafe device info and sensor creation

* Code review
This commit is contained in:
Aaron Bach authored and GitHub committed 2020-10-16 12:01:16 -05:00
1 parent 1c3ec69166
commit bbef87d3f3
3 files changed
+25 -44

No files matched your search

@@ -607,6 +607,14 @@ class SimpliSafeEntity(Entity):
ATTR_SYSTEM_ID: system.system_id,
}
self._device_info = {
"identifiers": {(DOMAIN, system.system_id)},
"manufacturer": "SimpliSafe",
"model": system.version,
"name": name,
"via_device": (DOMAIN, system.serial),
}
@property
def available(self):
"""Return whether the entity is available."""
@@ -620,13 +628,7 @@ class SimpliSafeEntity(Entity):
@property
def device_info(self):
"""Return device registry information for this entity."""
return {
"identifiers": {(DOMAIN, self._system.system_id)},
"manufacturer": "SimpliSafe",
"model": self._system.version,
"name": self._name,
"via_device": (DOMAIN, self._system.serial),
}
return self._device_info
@property
def device_state_attributes(self):
@@ -730,4 +732,3 @@ class SimpliSafeEntity(Entity):
@callback
def async_update_from_websocket_event(self, event):
"""Update the entity with the provided websocket event."""
raise NotImplementedError()