mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Fix ecobee binary sensor and sensor unique ids (#27208)
* Fix sensor unique id * Fix binary sensor unique id
This commit is contained in:
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…
x
Reference in New Issue
Block a user