Fix round typing [zwave_js] (#82439)
This commit is contained in:
parent
3bea04e387
commit
d2000f0c7a
2 changed files with 2 additions and 2 deletions
|
@ -129,7 +129,7 @@ class ZWaveCover(ZWaveBaseEntity, CoverEntity):
|
||||||
if self.info.primary_value.value is None:
|
if self.info.primary_value.value is None:
|
||||||
# guard missing value
|
# guard missing value
|
||||||
return None
|
return None
|
||||||
return round((self.info.primary_value.value / 99) * 100)
|
return round((cast(int, self.info.primary_value.value) / 99) * 100)
|
||||||
|
|
||||||
async def async_set_cover_position(self, **kwargs: Any) -> None:
|
async def async_set_cover_position(self, **kwargs: Any) -> None:
|
||||||
"""Move the cover to a specific position."""
|
"""Move the cover to a specific position."""
|
||||||
|
|
|
@ -177,7 +177,7 @@ class ZwaveLight(ZWaveBaseEntity, LightEntity):
|
||||||
"""
|
"""
|
||||||
if self.info.primary_value.value is None:
|
if self.info.primary_value.value is None:
|
||||||
return None
|
return None
|
||||||
return round((self.info.primary_value.value / 99) * 255)
|
return round((cast(int, self.info.primary_value.value) / 99) * 255)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def color_mode(self) -> str | None:
|
def color_mode(self) -> str | None:
|
||||||
|
|
Loading…
Add table
Reference in a new issue