mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Override unique_id of NestActivityZoneSensor (#16961)
This commit is contained in:
parent
909c3bdd63
commit
c600d28b6a
@ -147,6 +147,11 @@ class NestActivityZoneSensor(NestBinarySensor):
|
|||||||
self.zone = zone
|
self.zone = zone
|
||||||
self._name = "{} {} activity".format(self._name, self.zone.name)
|
self._name = "{} {} activity".format(self._name, self.zone.name)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def unique_id(self):
|
||||||
|
"""Return unique id based on camera serial and zone id."""
|
||||||
|
return "{}-{}".format(self.device.serial, self.zone.zone_id)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def device_class(self):
|
def device_class(self):
|
||||||
"""Return the device class of the binary sensor."""
|
"""Return the device class of the binary sensor."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user