homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude: 25.4375
longitude: [url=tel:119.0260]119.0260[/url]
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation: 40
# 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
[color=#ff0000] customize:[/color]
binary_sensor.motion_sensor_158d00016dc723:
friendly_name: 人体传感器
homebridge_name: 人体传感器
# homebridge_hidden: true
binary_sensor.door_window_sensor_158d0001f4h3c7:
friendly_name: 大门开关感应
homebridge_name: 大门开关感应
sensor.temperature_158d000123r52a:
friendly_name: 温度
homebridge_name: 温度
sensor.humidity_158d000123r52a:
friendly_name: 湿度
homebridge_name: 湿度
binary_sensor.switch_158d0001bf8271:
friendly_name: 无线开关
homebridge_name: 无线开关
binary_sensor.switch_158d0001f42969:
friendly_name: 门铃
homebridge_name: 门铃
switch.wall_switch_158d0001f58666:
friendly_name: 餐厅灯
homebridge_name: 餐厅灯
light.gateway_light_7811dca474ae:
friendly_name: 网关灯
homebridge_name: 网关灯
sensor.illumination_7811dca474ae:
friendly_name: 光感应器
homebridge_name: 光感应器
[color=#ff0000]xiaomi_aqara:
gateways:
- mac: 7811dca47fae
key: fcj7e9igc8k8nqdl[/color]
[color=#ff0000]mqtt:
broker: 192.168.1.55
port: 1883
client_id: home-assistant
keepalive: 60
username: pi
password: [url=tel:1234567890]1234567890[/url]
discovery: true[/color]
[color=#ff0000]switch:
- platform: mqtt
name: "楼梯灯"
state_topic: "stat/S4/POWER"
command_topic: "cmnd/S4/POWER"
qos: 1
payload_on: "ON"
payload_off: "OFF"
retain: true[/color]
[color=#ff0000]light:
- platform: yeelight
devices:
192.168.1.104:
name: 主卧床头灯
transition: 1000
use_music_mode: True
save_on_change: False
# 192.168.1.13:
# name: Front Door[/color]
# Show links to resources in log and frontend
introduction:
# Enables the frontend
frontend:
# Enables configuration UI
config:
http:
# Secrets are defined in the file secrets.yaml
# api_password: !secret http_password
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# base_url: example.duckdns.org:8123
# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# [url=https://home-assistant.io/blog/2016/10/25/explaining-the-updater/]https://home-assistant.io/blog/2016/10/25/explaining-the-updater/[/url]
updater:
# Optional, allows Home Assistant developers to focus on popular components.
# include_used_components: true
# Discover some devices automatically
discovery:
# Allows you to issue voice commands from the frontend in enabled browsers
conversation:
# Enables support for tracking state changes over time
history:
# View all events in a logbook
logbook:
# Enables a map showing the location of tracked devices
map:
# Track the sun
sun:
# Weather prediction
sensor:
- platform: yr
tts:
- platform: google
group: !include groups.yaml
automation: !include automations.yaml
#xiaomi: !include xiaomi.yaml
script: !include scripts.yaml
错误日志:
Testing configuration at /config
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setting up mqtt
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setting up introduction
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setting up http
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setup of domain mqtt took 0.0 seconds.
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setting up recorder
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setup of domain introduction took 0.0 seconds.
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setup of domain http took 0.0 seconds.
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setup of domain recorder took 0.0 seconds.
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setting up system_log
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setting up api
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setting up websocket_api
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setting up history
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setup of domain system_log took 0.0 seconds.
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setup of domain api took 0.0 seconds.
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setup of domain websocket_api took 0.0 seconds.
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setup of domain history took 0.0 seconds.
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setting up frontend
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setup of domain frontend took 0.0 seconds.
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setting up discovery
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setting up sun
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setting up sensor
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setting up group
2018-02-04 01:37:21 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Entity ID sonoff_3 is an invalid entity id for dictionary value @ data['action'][0]['entity_id']. Got None. (See /config/configuration.yaml, line 155). Please check the docs at https://home-assistant.io/components/automation/
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setting up xiaomi_aqara
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setting up map
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setting up updater
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setup of domain discovery took 0.1 seconds.
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setup of domain sun took 0.1 seconds.
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setup of domain sensor took 0.1 seconds.
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setup of domain group took 0.0 seconds.
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setup of domain xiaomi_aqara took 0.0 seconds.
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setup of domain map took 0.0 seconds.
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setup of domain updater took 0.0 seconds.
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setting up tts
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setting up config
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setting up logbook
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setting up conversation
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setup of domain tts took 0.0 seconds.
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setting up script
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setting up light
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setting up automation
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setup of domain config took 0.0 seconds.
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setup of domain logbook took 0.0 seconds.
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setup of domain conversation took 0.0 seconds.
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setup of domain script took 0.0 seconds.
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setup of domain light took 0.0 seconds.
2018-02-04 01:37:21 INFO (MainThread) [homeassistant.setup] Setup of domain automation took 0.0 seconds.
Failed config
automation:
- action: [source /config/automations.yaml:21]
entity_id: Sonoff_3
service: switch.toggle
alias: double_button
initial_state: True
trigger: [source /config/automations.yaml:15]
platform: event
event_data: [source /config/automations.yaml:18]
click_type: double
entity_id: binary_sensor.switch_158d0001bf2271
event_type: click