Scale Z-Wave.Me max values (#70274)
Co-authored-by: Dmitry Vlasov <kerbalspacema@gmail.com>pull/70311/head
parent
9860ae562e
commit
725339145f
|
@ -74,4 +74,7 @@ class ZWaveMeCover(ZWaveMeEntity, CoverEntity):
|
||||||
|
|
||||||
None is unknown, 0 is closed, 100 is fully open.
|
None is unknown, 0 is closed, 100 is fully open.
|
||||||
"""
|
"""
|
||||||
|
if self.device.level == 99: # Scale max value
|
||||||
|
return 100
|
||||||
|
|
||||||
return self.device.level
|
return self.device.level
|
||||||
|
|
|
@ -42,6 +42,8 @@ class ZWaveMeNumber(ZWaveMeEntity, NumberEntity):
|
||||||
@property
|
@property
|
||||||
def value(self):
|
def value(self):
|
||||||
"""Return the unit of measurement."""
|
"""Return the unit of measurement."""
|
||||||
|
if self.device.level == 99: # Scale max value
|
||||||
|
return 100
|
||||||
return self.device.level
|
return self.device.level
|
||||||
|
|
||||||
def set_value(self, value: float) -> None:
|
def set_value(self, value: float) -> None:
|
||||||
|
|
Loading…
Reference in New Issue