mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 02:07:09 +00: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:
parent
01925fdfff
commit
9ea5afd109
@ -62,6 +62,23 @@ class NestCamera(Camera):
|
|||||||
"""Return the name of the nest, if any."""
|
"""Return the name of the nest, if any."""
|
||||||
return self._name
|
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
|
@property
|
||||||
def should_poll(self):
|
def should_poll(self):
|
||||||
"""Nest camera should poll periodically."""
|
"""Nest camera should poll periodically."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user