diff --git a/homeassistant/components/isy994/__init__.py b/homeassistant/components/isy994/__init__.py index 6399cbe46e1..a2d3da6ed42 100644 --- a/homeassistant/components/isy994/__init__.py +++ b/homeassistant/components/isy994/__init__.py @@ -156,7 +156,6 @@ async def async_setup_entry( password=password, use_https=https, tls_ver=tls_version, - log=_LOGGER, webroot=host.path, ) ) diff --git a/homeassistant/components/isy994/config_flow.py b/homeassistant/components/isy994/config_flow.py index bc589a3aa11..6049b8c6ec3 100644 --- a/homeassistant/components/isy994/config_flow.py +++ b/homeassistant/components/isy994/config_flow.py @@ -94,13 +94,12 @@ def _fetch_isy_configuration( password, use_https, tls_ver, - log=_LOGGER, webroot=webroot, ) except ValueError as err: raise InvalidAuth(err.args[0]) from err - return Configuration(log=_LOGGER, xml=isy_conn.get_config()) + return Configuration(xml=isy_conn.get_config()) class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): diff --git a/homeassistant/components/isy994/helpers.py b/homeassistant/components/isy994/helpers.py index a2550f6746c..e1ab689eb7a 100644 --- a/homeassistant/components/isy994/helpers.py +++ b/homeassistant/components/isy994/helpers.py @@ -402,7 +402,7 @@ async def migrate_old_unique_ids( def convert_isy_value_to_hass( value: Union[int, float, None], uom: str, - precision: str, + precision: Union[int, str], fallback_precision: Optional[int] = None, ) -> Union[float, int]: """Fix ISY Reported Values. @@ -418,7 +418,7 @@ def convert_isy_value_to_hass( return None if uom in [UOM_DOUBLE_TEMP, UOM_ISYV4_DEGREES]: return round(float(value) / 2.0, 1) - if precision != "0": + if precision not in ("0", 0): return round(float(value) / 10 ** int(precision), int(precision)) if fallback_precision: return round(float(value), fallback_precision) diff --git a/homeassistant/components/isy994/manifest.json b/homeassistant/components/isy994/manifest.json index 2effed0c06c..9e22b3533d7 100644 --- a/homeassistant/components/isy994/manifest.json +++ b/homeassistant/components/isy994/manifest.json @@ -2,7 +2,7 @@ "domain": "isy994", "name": "Universal Devices ISY994", "documentation": "https://www.home-assistant.io/integrations/isy994", - "requirements": ["pyisy==2.0.2"], + "requirements": ["pyisy==2.1.0"], "codeowners": ["@bdraco", "@shbatm"], "config_flow": true, "ssdp": [ diff --git a/homeassistant/components/isy994/sensor.py b/homeassistant/components/isy994/sensor.py index b4eba10fd34..331037fbb3c 100644 --- a/homeassistant/components/isy994/sensor.py +++ b/homeassistant/components/isy994/sensor.py @@ -106,12 +106,16 @@ class ISYSensorVariableEntity(ISYEntity): @property def state(self): """Return the state of the variable.""" - return self._node.status + return convert_isy_value_to_hass(self._node.status, "", self._node.prec) @property def device_state_attributes(self) -> Dict: """Get the state attributes for the device.""" - return {"init_value": int(self._node.init)} + return { + "init_value": convert_isy_value_to_hass( + self._node.init, "", self._node.prec + ) + } @property def icon(self): diff --git a/requirements_all.txt b/requirements_all.txt index 85749208a87..490e38cc68e 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1451,7 +1451,7 @@ pyirishrail==0.0.2 pyiss==1.0.1 # homeassistant.components.isy994 -pyisy==2.0.2 +pyisy==2.1.0 # homeassistant.components.itach pyitachip2ir==0.0.7 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 4b24b2d9e48..c9e4db612ba 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -709,7 +709,7 @@ pyipp==0.11.0 pyiqvia==0.2.1 # homeassistant.components.isy994 -pyisy==2.0.2 +pyisy==2.1.0 # homeassistant.components.kira pykira==0.1.1