Fix ecobee binary sensor and sensor unique ids (#27208)
* Fix sensor unique id * Fix binary sensor unique idpull/27374/head
parent
756e22290d
commit
33da7d341d
|
@ -50,7 +50,8 @@ class EcobeeBinarySensor(BinarySensorDevice):
|
|||
if sensor["name"] == self.sensor_name:
|
||||
if "code" in sensor:
|
||||
return f"{sensor['code']}-{self.device_class}"
|
||||
return f"{sensor['id']}-{self.device_class}"
|
||||
thermostat = self.data.ecobee.get_thermostat(self.index)
|
||||
return f"{thermostat['identifier']}-{sensor['id']}-{self.device_class}"
|
||||
|
||||
@property
|
||||
def is_on(self):
|
||||
|
|
|
@ -61,7 +61,8 @@ class EcobeeSensor(Entity):
|
|||
if sensor["name"] == self.sensor_name:
|
||||
if "code" in sensor:
|
||||
return f"{sensor['code']}-{self.device_class}"
|
||||
return f"{sensor['id']}-{self.device_class}"
|
||||
thermostat = self.data.ecobee.get_thermostat(self.index)
|
||||
return f"{thermostat['identifier']}-{sensor['id']}-{self.device_class}"
|
||||
|
||||
@property
|
||||
def device_class(self):
|
||||
|
|
Loading…
Reference in New Issue