I got this in the error logs the first time I restarted, then Hass.io would not restart at all. It was stuck at the main screen with “Uploading Data”. On a hunch, I commented out anything Weather Underground in my config and customize files and it restarted. I would like to get this fixed.
Here was my error log:
2017-09-11 10:05:36 WARNING (Recorder) [homeassistant.components.recorder] Ended unfinished session (id=252 from 2017-09-11 16:52:24.443988)
2017-09-11 10:05:38 ERROR (SyncWorker_7) [homeassistant.components.sensor.wunderground] Check WUnderground API ('Expecting value: line 2 column 1 (char 1)',)
2017-09-11 10:05:39 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.6/asyncio/tasks.py", line 179, in _step
result = coro.send(None)
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 381, in async_process_entity
new_entity, self, update_before_add=update_before_add
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 238, in async_add_entity
yield from entity.async_update_ha_state()
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 256, in async_update_ha_state
self._attr_setter('entity_picture', str, ATTR_ENTITY_PICTURE, attr)
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 323, in _attr_setter
value = getattr(self, name)
File "/usr/lib/python3.6/site-packages/homeassistant/components/sensor/wunderground.py", line 712, in entity_picture
return re.sub(r'^http://', 'https://', url, flags=re.IGNORECASE)
File "/usr/lib/python3.6/re.py", line 191, in sub
return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or bytes-like object
After trying to restart while doing some troubleshooting, Hass.io got hung up on “Uploading data”. I did some more troubleshooting and (by accident) got Weather Underground working again. Here’s how:
I commented out the sensor in the config file and restarted Hass.io.
Well, my logs are still full of errors. This repeats many many times:
2017-09-11 16:50:06 ERROR (SyncWorker_15) [homeassistant.components.sensor.wunderground] Check WUnderground API ('you must supply a key',)
2017-09-11 16:50:06 ERROR (MainThread) [homeassistant.components.sensor] Error while update entity from wunderground in sensor
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 450, in _update_entity_states
yield from update_coro
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 256, in async_update_ha_state
self._attr_setter('entity_picture', str, ATTR_ENTITY_PICTURE, attr)
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 323, in _attr_setter
value = getattr(self, name)
File "/usr/lib/python3.6/site-packages/homeassistant/components/sensor/wunderground.py", line 712, in entity_picture
return re.sub(r'^http://', 'https://', url, flags=re.IGNORECASE)
File "/usr/lib/python3.6/re.py", line 191, in sub
return _compile(pattern, flags).sub(repl, string, count)
wunderground didn’t work for me on hass.io 0.53, but started working when I upgraded to 0.53.1.
There are still some errors in the log, but info is pulling down and updating.
2017-09-14 14:38:33 ERROR (MainThread) [homeassistant.components.sensor] Error while update entity from wunderground in sensor
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py”, line 450, in _update_entity_states
yield from update_coro
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 247, in async_update_ha_state
device_attr = self.device_state_attributes
File “/usr/lib/python3.6/site-packages/homeassistant/components/sensor/wunderground.py”, line 689, in device_state_attributes
for (attr, callback) in attrs.items():
AttributeError: ‘function’ object has no attribute ‘items’
I’ve been seeing those errors since I started with HASS a couple of months ago, using both Hassbian and HASS.IO (I’m running 0.53 HASS right now). I’ve tried removing each of the WU sensors individually, without success. Data does come down, but the log is full of errors. I saw the fix in 0.53.1 and will try that this weekend to see if it improves things.