Revert changes to platforms using self.device (#16209)
* Revert tank_utility * Fix Soundtouch * Fix Plex * Fix Emby * Fix Radiotherm * Fix Juicenet * Fix Qwikswitch * Fix Xiaomi miio * Fix Nest * Fix Tellduslive * Fix KNX
This commit is contained in:
1 parent
969b15a297
commit
2ad938ed44
28 files changed
+256
-237
No files matched your search
@@ -140,15 +140,15 @@ class NestBasicSensor(NestSensorDevice):
|
||||
self._unit = SENSOR_UNITS.get(self.variable)
|
||||
|
||||
if self.variable in VARIABLE_NAME_MAPPING:
|
||||
self._state = getattr(self._device,
|
||||
self._state = getattr(self.device,
|
||||
VARIABLE_NAME_MAPPING[self.variable])
|
||||
elif self.variable in PROTECT_SENSOR_TYPES \
|
||||
and self.variable != 'color_status':
|
||||
# keep backward compatibility
|
||||
state = getattr(self._device, self.variable)
|
||||
state = getattr(self.device, self.variable)
|
||||
self._state = state.capitalize() if state is not None else None
|
||||
else:
|
||||
self._state = getattr(self._device, self.variable)
|
||||
self._state = getattr(self.device, self.variable)
|
||||
|
||||
|
||||
class NestTempSensor(NestSensorDevice):
|
||||
@@ -166,12 +166,12 @@ class NestTempSensor(NestSensorDevice):
|
||||
|
||||
def update(self):
|
||||
"""Retrieve latest state."""
|
||||
if self._device.temperature_scale == 'C':
|
||||
if self.device.temperature_scale == 'C':
|
||||
self._unit = TEMP_CELSIUS
|
||||
else:
|
||||
self._unit = TEMP_FAHRENHEIT
|
||||
|
||||
temp = getattr(self._device, self.variable)
|
||||
temp = getattr(self.device, self.variable)
|
||||
if temp is None:
|
||||
self._state = None
|
||||
|
||||
|
||||
Reference in new issue
Block a user