From 31aed6450d6dce512599499354d6a153fd453a19 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk <11290930+bouwew@users.noreply.github.com> Date: Thu, 17 Dec 2020 19:25:03 +0100 Subject: [PATCH] Remove sensor-scaling, handled by the back-end --- homeassistant/components/plugwise/sensor.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/homeassistant/components/plugwise/sensor.py b/homeassistant/components/plugwise/sensor.py index 578f1bc7f7e..f57ff2b2a91 100644 --- a/homeassistant/components/plugwise/sensor.py +++ b/homeassistant/components/plugwise/sensor.py @@ -305,10 +305,7 @@ class PwThermostatSensor(SmileSensor, Entity): return if data.get(self._sensor) is not None: - measurement = data[self._sensor] - if self._unit_of_measurement == PERCENTAGE: - measurement = int(measurement * 100) - self._state = measurement + self._state = data[self._sensor] self._icon = CUSTOM_ICONS.get(self._sensor, self._icon) self.async_write_ha_state() @@ -380,10 +377,7 @@ class PwPowerSensor(SmileSensor, Entity): return if data.get(self._sensor) is not None: - measurement = data[self._sensor] - if self._unit_of_measurement == ENERGY_KILO_WATT_HOUR: - measurement = round((measurement / 1000), 1) - self._state = measurement + self._state = data[self._sensor] self._icon = CUSTOM_ICONS.get(self._sensor, self._icon) self.async_write_ha_state()