Check for 'unknown' sensor values in ecobee (#1983)
parent
b86a1ece01
commit
fb3b3db04e
|
@ -78,18 +78,10 @@ class EcobeeSensor(Entity):
|
|||
data.update()
|
||||
for sensor in data.ecobee.get_remote_sensors(self.index):
|
||||
for item in sensor['capability']:
|
||||
if (
|
||||
item['type'] == self.type and
|
||||
self.type == 'temperature' and
|
||||
if (item['type'] == self.type and
|
||||
self.sensor_name == sensor['name']):
|
||||
self._state = float(item['value']) / 10
|
||||
elif (
|
||||
item['type'] == self.type and
|
||||
self.type == 'humidity' and
|
||||
self.sensor_name == sensor['name']):
|
||||
self._state = item['value']
|
||||
elif (
|
||||
item['type'] == self.type and
|
||||
self.type == 'occupancy' and
|
||||
self.sensor_name == sensor['name']):
|
||||
self._state = item['value']
|
||||
if (self.type == 'temperature' and
|
||||
item['value'] != 'unknown'):
|
||||
self._state = float(item['value']) / 10
|
||||
else:
|
||||
self._state = item['value']
|
||||
|
|
Loading…
Reference in New Issue