c1pher-cn / heweather

和风天气 homeassistant插件
107 stars 21 forks source link

配置sensor时出错 #19

Open kylin7226 opened 9 months ago

kylin7226 commented 9 months ago

麻烦看下,配置sensor时出错,但是配置weather没有问题 配置如下: sensor:  - platform: heweather   location: 101200112 # 填写你所在区域代码Location_ID,https://github.com/qwd/LocationList/blob/master/China-City-List-latest.csv   key: xxxxxxx # api平台申请的key   disasterlevel: 3   disastermsg: allmsg

错误信息如下: Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/commands.py:230 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 22:29:53 (1 occurrences) Last logged: 22:29:53

[547095428160] The system cannot restart because the configuration is not valid: Integration error:   key - Integration '  key' not found. Integration error:   disasterlevel - Integration '  disasterlevel' not found. Integration error:  - - Integration ' -' not found. Integration error:   disastermsg - Integration '  disastermsg' not found. Integration error:   location - Integration '  location' not found. Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 230, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 2035, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2072, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 986, in admin_handler await result File "/usr/src/homeassistant/homeassistant/components/homeassistant/init.py", line 191, in async_handle_core_service raise HomeAssistantError( homeassistant.exceptions.HomeAssistantError: The system cannot restart because the configuration is not valid: Integration error:   key - Integration '  key' not found. Integration error:   disasterlevel - Integration '  disasterlevel' not found. Integration error:  - - Integration ' -' not found. Integration error:   disastermsg - Integration '  disastermsg' not found. Integration error:   location - Integration '  location' not found.

c1pher-cn commented 9 months ago

检查下sensor.py有没有放到指定位置

c1pher-cn commented 9 months ago

那检查下sensor配置里的空格和缩进格式