colorfulclouds-hass icon indicating copy to clipboard operation
colorfulclouds-hass copied to clipboard

KeyError: 'result' to get info

Open aetherwu opened this issue 5 years ago • 1 comments

2019-08-03 14:19:01 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 254, in async_update_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in _async_write_ha_state state = self.state File "/config/custom_components/colorfulclouds/weather.py", line 74, in state skycon = self._realtime_data['result']['realtime']['skycon'] KeyError: 'result'

aetherwu avatar Aug 03 '19 13:08 aetherwu

2019-08-03 14:19:01 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 254, in async_update_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in _async_write_ha_state state = self.state File "/config/custom_components/colorfulclouds/weather.py", line 74, in state skycon = self._realtime_data['result']['realtime']['skycon'] KeyError: 'result'

检查你的经纬度和api_key设置,这是数据没有获取到

0uzu0 avatar Aug 03 '19 13:08 0uzu0