ERROR:homeassistant.components.thermostat:Error while setting up platform radiotherm
Traceback (most recent call last):
File “/usr/local/lib/python3.4/dist-packages/homeassistant/helpers/entity_component.py”, line 98, in _setup_platform
discovery_info)
File “/usr/local/lib/python3.4/dist-packages/homeassistant/components/thermostat/radiotherm.py”, line 40, in setup_platform
tstats.append(RadioThermostat(tstat, hold_temp))
File “/usr/local/lib/python3.4/dist-packages/homeassistant/components/thermostat/radiotherm.py”, line 55, in init
self.set_time()
File “/usr/local/lib/python3.4/dist-packages/homeassistant/components/thermostat/radiotherm.py”, line 124, in set_time
‘hour’: now.hour, ‘minute’: now.minute}
AttributeError: ‘NoneType’ object has no attribute ‘time’
I tried playing around with the source a bit but wasn’t able to get it to do much else. I’m running Ubuntu 14.04 using python 3.4.3. Hass is running in a virtualenv and it was installed via pip.
Any thoughts on this one?
EDIT: Tried the dev of Home Assistant from git but am still running into the issue. Not sure if that helps, but thought I’d toss that out in case it was helpful.
I played around with this tonight for pulling stats from Radio Thermostat for my own data collection outside of Home Assistant (to combine with my outdoor weather station and solar power and usage readings) and I noticed that the radiotherm library seems to work a bit differently than the documentation suggests (found here: https://github.com/mhrivnak/radiotherm). I used Python 2.7.6 for my own stuff but in order to create a new thermostat, I had to do:
Home Assistant seems to be doing what the docs for the library suggest which is:
tstat = radiotherm.get_thermostat(host)
Oddly, the library has not been updated in quite some time, so maybe my own tests were flawed, but the error I’m getting with Home Assistant suggests that the thermostat isn’t getting instantiated properly which is the same problem I was having in my own code.
With the help of a kind Redditor, I figured out what the issue was and submitted a PR to the radiotherm library (https://github.com/mhrivnak/radiotherm/pull/18). That said, I see a similar PR was submitted on Jan 2nd which has be concerned as to if the project is still being maintained. But I did find a fix at least which is up there in the PR if anyone needs it.