最新的hass更新了这两种方式的配置,和旧版本相比,主要是位置的变化,新版配置如下显示,举个例子
homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude: 31.22
longitude: 121.53
# 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
packages: !include_dir_named packages
auth_providers:
- type: trusted_networks
trusted_networks:
- 127.0.0.1
- fd00::/8
- 192.168.1.103
- #你想要设置的白名单
- type: legacy_api_password
api_password: #自己设置