Scale Z-Wave.Me max values (#70274)

Co-authored-by: Dmitry Vlasov <kerbalspacema@gmail.com>
pull/70311/head
Poltorak Serguei 2022-04-20 09:38:55 +03:00 committed by GitHub
parent 9860ae562e
commit 725339145f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -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

View File

@ -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: