Add unique ID and device info to Nest camera (#16846)

* Add unique ID and device info to Nest camera

* Remove sw version
pull/16940/head
Paulus Schoutsen 2018-09-25 13:47:12 +02:00 committed by Paulus Schoutsen
parent b9043ef7a7
commit 345c886dec
1 changed files with 17 additions and 0 deletions

View File

@ -62,6 +62,23 @@ class NestCamera(Camera):
"""Return the name of the nest, if any."""
return self._name
@property
def unique_id(self):
"""Return the serial number."""
return self.device.device_id
@property
def device_info(self):
"""Return information about the device."""
return {
'identifiers': {
(nest.DOMAIN, self.device.device_id)
},
'name': self.device.name_long,
'manufacturer': 'Nest Labs',
'model': "Camera",
}
@property
def should_poll(self):
"""Nest camera should poll periodically."""