1
mirror of https://github.com/home-assistant/core synced 2024-07-27 18:58:57 +02:00

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

* Add unique ID and device info to Nest camera

* Remove sw version
This commit is contained in:
Paulus Schoutsen 2018-09-25 13:47:12 +02:00 committed by GitHub
parent 01925fdfff
commit 9ea5afd109
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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."""