diff --git a/homeassistant/components/isy994/cover.py b/homeassistant/components/isy994/cover.py index 7c82ea2459a..60027a31c89 100644 --- a/homeassistant/components/isy994/cover.py +++ b/homeassistant/components/isy994/cover.py @@ -1,7 +1,7 @@ """Support for ISY994 covers.""" from __future__ import annotations -from typing import Any +from typing import Any, cast from pyisy.constants import ISY_VALUE_UNKNOWN @@ -58,7 +58,7 @@ class ISYCoverEntity(ISYNodeEntity, CoverEntity): if self._node.status == ISY_VALUE_UNKNOWN: return None if self._node.uom == UOM_8_BIT_RANGE: - return round(self._node.status * 100.0 / 255.0) + return round(cast(float, self._node.status) * 100.0 / 255.0) return int(sorted((0, self._node.status, 100))[1]) @property diff --git a/homeassistant/components/isy994/light.py b/homeassistant/components/isy994/light.py index 4606ef7e8de..6e67ed32938 100644 --- a/homeassistant/components/isy994/light.py +++ b/homeassistant/components/isy994/light.py @@ -1,7 +1,7 @@ """Support for ISY994 lights.""" from __future__ import annotations -from typing import Any +from typing import Any, cast from pyisy.constants import ISY_VALUE_UNKNOWN from pyisy.helpers import NodeProperty @@ -70,7 +70,7 @@ class ISYLightEntity(ISYNodeEntity, LightEntity, RestoreEntity): return None # Special Case for ISY Z-Wave Devices using % instead of 0-255: if self._node.uom == UOM_PERCENTAGE: - return round(self._node.status * 255.0 / 100.0) + return round(cast(float, self._node.status) * 255.0 / 100.0) return int(self._node.status) async def async_turn_off(self, **kwargs: Any) -> None: