feat: add an alongside switch entity for the water heater (#1115)

This commit is contained in:
Li Shuzhen
2025-05-23 09:10:11 +08:00
committed by GitHub
parent 1bd338639b
commit 62dd32a132
4 changed files with 81 additions and 53 deletions

View File

@ -601,7 +601,7 @@ class MIoTSpecProperty(_MIoTSpecBase):
if value is None:
return None
if self.format_ == int:
return int(value)
return int(round(value))
if self.format_ == float:
return round(value, self.precision)
if self.format_ == bool: