File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 365, in _async_add_entity
await entity.async_update_ha_state()
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 225, in async_update_ha_state
self._async_write_ha_state()
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 256, in _async_write_ha_state
attr.update(self.device_state_attributes or {})
File "/home/homeassistant/.homeassistant/custom_components/isy994/__init__.py", line 484, in device_state_attributes
for name, val in self._node.aux_properties.items():
AttributeError: 'list' object has no attribute 'items'
EDIT: here’s what the _node.aux_properties contains:
Hm, I’m pretty sure I pulled the custom component files from your latest release, but I’ll double check this. I’ve enabled debug logs and created an issue for you - thanks! https://github.com/shbatm/home-assistant/issues/1
edit: confirmed I cloned out of the correct branch, all files md5 the same.
I just followed the above steps with hassio and am getting an error in the logs and no climate device showing up in the UI. I am using an ISY994i with a Venstar T1800.
2019-06-06 13:55:00 ERROR (MainThread) [homeassistant.core] Error doing job: Tas
k exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 3
65, in _async_add_entity
await entity.async_update_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 225, in as
ync_update_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 255, in _a
sync_write_ha_state
attr.update(self.state_attributes or {})
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", li
ne 211, in state_attributes
self.precision),
File "/usr/src/homeassistant/homeassistant/helpers/temperature.py", line 22, i
n display_temp
"Temperature is not a number: {}".format(temperature))
TypeError: Temperature is not a number: None
@sjthespian Please try changing the last line of isy994/climate.py from the following:
from:
return temp
EDITED:
to
return round(float(temp), 1)
or:
return round(int(temp) / 10, 1)
I’m not sure what the precision is. If you can, please post the results of http://your.isy.ip/rest/nodes/NODEID so I can see if it provides the precision or if I have to guess.
@jon102034050 It looks like your error is being caused by the following issue:
I’ve added the proposed pull request from @OverloadUT to my test branch of PyISY to see if it solves the problem.
Please try downloading the latest update and restart. If setup as a custom component, it should force an installation of the PyISY_beta v1.1.5 package.
Forcing it to a float doesn’t seem to help, it looks like it’s trying to return None:
2019-06-10 07:50:08 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 365, in _async_add_entity
await entity.async_update_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 225, in async_update_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 255, in _async_write_ha_state
attr.update(self.state_attributes or {})
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 210, in state_attributes
self.hass, self.current_temperature, self.temperature_unit,
File "/config/custom_components/isy994/climate.py", line 231, in current_temperature
return self.value
File "/config/custom_components/isy994/climate.py", line 204, in value
return self.fix_temp(self._node.status)
File "/config/custom_components/isy994/climate.py", line 340, in fix_temp
return round(float(temp), 1)
File "/usr/local/lib/python3.7/site-packages/VarEvents/__init__.py", line 223, in __float__
return float(self._val)
TypeError: float() argument must be a string or a number, not 'NoneType'
I just grabbed the latest code from github and enabled debug – interestingly enough, it looks like it isn’t the thermostat that is causing the problem! It’s one of my ZWave devices…
2019-06-10 10:19:54 DEBUG (MainThread) [custom_components.isy994.climate] Adding ISY node Node(ZW003_144) to Climate platform
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 210, in state_attributes
File "/config/custom_components/isy994/climate.py", line 231, in current_temperature
File "/config/custom_components/isy994/climate.py", line 204, in value
File "/config/custom_components/isy994/climate.py", line 340, in fix_temp
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 210, in state_attributes
File "/config/custom_components/isy994/climate.py", line 231, in current_temperature
File "/config/custom_components/isy994/climate.py", line 204, in value
File "/config/custom_components/isy994/climate.py", line 340, in fix_temp
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 210, in state_attributes
File "/config/custom_components/isy994/climate.py", line 231, in current_temperature
File "/config/custom_components/isy994/climate.py", line 204, in value
File "/config/custom_components/isy994/climate.py", line 340, in fix_temp
I am not sure why it is picking that up as a climate device:
2019-06-10 11:09:06 DEBUG (MainThread) [custom_components.isy994.climate] Adding ISY node Node(14 14 F0 1) to Climate platform
2019-06-10 11:09:06 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new climate.isy994 entity: climate.thermostat
But, there are still no climate entities showing up in the UI:
Entity not available: climate.thermostat
and there are no climate entities in the developer tools.
And I found this further down in the logs:
2019-06-10 11:09:07 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 363, in _async_add_entity
await entity.async_added_to_hass()
File "/config/custom_components/isy994/climate.py", line 130, in async_added_to_hass
if i['id'] == ISY_CURRENT_HUMIDITY), False)
File "/config/custom_components/isy994/climate.py", line 130, in <genexpr>
if i['id'] == ISY_CURRENT_HUMIDITY), False)
TypeError: string indices must be integers
However, the for loop just looks at the key, not the value. I just changed the four loops to loop with values() instead and I am now getting climate data.
Here is the diff:
diff --git a/homeassistant/components/isy994/climate.py b/homeassistant/components/isy994/climate.py
index edbadae..7ac33fe 100644
--- a/homeassistant/components/isy994/climate.py
+++ b/homeassistant/components/isy994/climate.py
@@ -126,22 +126,22 @@ class ISYThermostatDevice(ISYDevice, ClimateDevice):
async def async_added_to_hass(self):
"""Delayed completion of initialization."""
- current_humidity = next((i for i in self._node.aux_properties
+ current_humidity = next((i for i in self._node.aux_properties.values()
if i['id'] == ISY_CURRENT_HUMIDITY), False)
if current_humidity:
self._current_humidity = current_humidity['value']
- target_temp_high = next((i for i in self._node.aux_properties
+ target_temp_high = next((i for i in self._node.aux_properties.values()
if i['id'] == ISY_TARGET_TEMP_HIGH), False)
if target_temp_high:
self._target_temp_high = self.fix_temp(target_temp_high['value'])
- target_temp_low = next((i for i in self._node.aux_properties
+ target_temp_low = next((i for i in self._node.aux_properties.values()
if i['id'] == ISY_TARGET_TEMP_LOW), False)
if target_temp_low:
self._target_temp_low = self.fix_temp(target_temp_low['value'])
- current_operation = next((i for i in self._node.aux_properties
+ current_operation = next((i for i in self._node.aux_properties.values()
if i['id'] == ISY_OPERATION_MODE), False)
if current_operation:
self._current_isy_operation = VALUE_TO_ISY_MODE.get(
As per the instructions @shbatm posted on March 26th, I just got this working on my Hassio instance, as well. Super simple, but for the less adventurous folks, here’s a bit more detail: I ssh’d into my instance (enable the ssh add-on, first, of course), created a temporary directory into which I cloned the repo, did git checkout isy994-climate-dev to get files in the branch, then copied the contents of the isy994 directory from the repo into /config/custom_components/isy994/. Finally, reboot the Hassio RPi and…viola! My Insteon thermostats show up as entities I can play with in HA now. Super stoked! Thanks for working on this @shbatm!
I just pushed another round of updates to the isy994-climate-dev branch–this is for compatibility with the new climate-1.0 framework in Home Assistant version > 0.96.0b0.
I also had to clean-up my code and branches, getting ready for some PRs. isy994-climate-dev now includes the general cleanup and Z-wave expansion in isy994-zwave-x. Use isy994-climate-dev if you want ALL of the changes I have been working on.