新手请教,群晖安装的hass,在homeassistan文件夹下新建了packages文件夹,复制了其他人的yaml文件(比如和风天气插件),然后在configuration.yaml修改,增加了packages: !include_dir_named packages,但是在配置-通用-配置重载-配置检查中,总是有错误,显示配置无效Invalid config for [sensor]: required key not provided @ data['platform']. Got None. (See ?, line ?). Please check the docs at https://home-assistant.io/components/sensor/。但是我在群晖的docker-容器-重启后,可以进入ha。请教应该怎么解决配置检查的问题(新手学习中,需不断试用配置检查)。看过一些帖子,把automations.yaml文件中的[]删除也不行,删除configuration.yaml文件中的automation: !include automations.yaml也不行,修改成#automation: !include automations.yaml也不行。
homeassistant:
packages: !include_dir_named packages
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude:
longitude:
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation: 0
# metric for Metric, imperial for Imperial
unit_system: metric
# Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
time_zone: Asia/Shanghai
# Customization file
customize: !include customize.yaml
homeassistant:
packages: !include_dir_named packages
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude:
longitude:
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation: 0
# metric for Metric, imperial for Imperial
unit_system: metric
# Pick yours from here: [url]http://en.wikipedia.org/wiki/List_of_tz_database_time_zones[/url]
time_zone: Asia/Shanghai
# Customization file
customize: !include customize.yaml
homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude:
longitude:
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation: 0
# metric for Metric, imperial for Imperial
unit_system: metric
# Pick yours from here: [url=http://en.wikipedia.org/wiki/List_of_tz_database_time_zones]http://en.wikipedia.org/wiki/List_of_tz_database_time_zones[/url]
time_zone: Asia/Shanghai
# Customization file
customize: !include customize.yaml
packages: !include_dir_named packages
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
homeassistant:
packages: !include_dir_named packages
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude:
longitude:
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation: 0
# metric for Metric, imperial for Imperial
unit_system: metric
# Pick yours from here: [url=http://en.wikipedia.org/wiki/List_of_tz_database_time_zones]http://en.wikipedia.org/wiki/List_of_tz_database_time_zones[/url]
time_zone: Asia/Shanghai
# Customization file
customize: !include customize.yaml
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
# Show the introduction message on startup.
introduction:
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
# base_url: example.duckdns.org:8123
# 传感器
sensor:
# Text to speech
tts:
- platform: google
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
关键是在群晖的docker-容器-重启后,可以进入ha,而且和帖子的教程里面一下正常显示天气了,但是在配置-通用-配置重载-配置检查中,总是有错误,显示配置无效Invalid config for [sensor]: required key not provided @ data['platform']. Got None. (See ?, line ?). Please check the docs at https://home-assistant.io/components/sensor/。
我的同样问题,安装斐讯DC1插件是一样显示:
nvalid config for [switch.phicomm_dc1m]: required key not provided @ data['192.168.123.107']. Got None. (See ?, line ?). Please check the docs at https://home-assistant.io/components/switch.phicomm_dc1m/。求教大神。