Skip to content

Commit 380ed32

Browse files
authored
Merge pull request #21 from plugwise/batt_percentage
Fix thermostat-sensor battery percentage
2 parents 01f4aa9 + 47ce763 commit 380ed32

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

custom_components/plugwise-beta/sensor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,8 @@ def update(self):
277277
if self._sensor in data:
278278
if data[self._sensor] is not None:
279279
measurement = data[self._sensor]
280+
if self._sensor == "battery":
281+
measurement = int(measurement * 100)
280282
self._state = measurement
281283

282284

0 commit comments

Comments
 (0)