From 725339145fae7cd19690881c8d5bed4eea3b7999 Mon Sep 17 00:00:00 2001 From: Poltorak Serguei Date: Wed, 20 Apr 2022 09:38:55 +0300 Subject: [PATCH] Scale Z-Wave.Me max values (#70274) Co-authored-by: Dmitry Vlasov --- homeassistant/components/zwave_me/cover.py | 3 +++ homeassistant/components/zwave_me/number.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/homeassistant/components/zwave_me/cover.py b/homeassistant/components/zwave_me/cover.py index 63aa7342cbe..7857306ef1f 100644 --- a/homeassistant/components/zwave_me/cover.py +++ b/homeassistant/components/zwave_me/cover.py @@ -74,4 +74,7 @@ class ZWaveMeCover(ZWaveMeEntity, CoverEntity): None is unknown, 0 is closed, 100 is fully open. """ + if self.device.level == 99: # Scale max value + return 100 + return self.device.level diff --git a/homeassistant/components/zwave_me/number.py b/homeassistant/components/zwave_me/number.py index 25e144cf033..efa7ceb8603 100644 --- a/homeassistant/components/zwave_me/number.py +++ b/homeassistant/components/zwave_me/number.py @@ -42,6 +42,8 @@ class ZWaveMeNumber(ZWaveMeEntity, NumberEntity): @property def value(self): """Return the unit of measurement.""" + if self.device.level == 99: # Scale max value + return 100 return self.device.level def set_value(self, value: float) -> None: