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:
Robert Svensson authored and Paulus Schoutsen committed 2018-08-26 21:25:39 +02:00
1 parent 289b1802fd
commit 5341785aae
28 files changed
+256 -237

No files matched your search

+5 -5
View File
@@ -64,7 +64,7 @@ class KNXSensor(Entity):
def __init__(self, hass, device):
"""Initialize of a KNX sensor."""
self._device = device
self.device = device
self.hass = hass
self.async_register_callbacks()
@@ -74,12 +74,12 @@ class KNXSensor(Entity):
async def after_update_callback(device):
"""Call after device was updated."""
await self.async_update_ha_state()
self._device.register_device_updated_cb(after_update_callback)
self.device.register_device_updated_cb(after_update_callback)
@property
def name(self):
"""Return the name of the KNX device."""
return self._device.name
return self.device.name
@property
def available(self):
@@ -94,12 +94,12 @@ class KNXSensor(Entity):
@property
def state(self):
"""Return the state of the sensor."""
return self._device.resolve_state()
return self.device.resolve_state()
@property
def unit_of_measurement(self):
"""Return the unit this state is expressed in."""
return self._device.unit_of_measurement()
return self.device.unit_of_measurement()
@property
def device_state_attributes(self):