Skip to main content

Home Assistant

# try
docker run --rm -it \
-e TZ=Asia/Shanghai \
--net=host \
--name="homeassistant" homeassistant/home-assistant:stable

# run
docker run -d --restart always \
-e TZ=Asia/Shanghai \
-p 8123:8123 \
-v /data/home-assistant/config:/config \
--name="homeassistant" homeassistant/home-assistant:stable

配置

homeassistant:
name: Home
# 位置
latitude: 32.87336
longitude: 117.22743
elevation: 430
# 单位
unit_system: metric
temperature_unit: C
time_zone: Asia/Shanghai
external_url: 'https://www.example.com'
internal_url: 'http://homeassistant.local:8123'
allowlist_external_dirs:
- /usr/var/dumping-ground
- /tmp
allowlist_external_urls:
- 'http://images.com/image1.png'
media_dirs:
media: /media
recordings: /mnt/recordings

auth_providers:
- type: homeassistant
- type: legacy_api_password
api_password: !secret http_password
- type: trusted_networks
trusted_networks:
- 192.168.0.0/24
- fd00::/8

- type: trusted_networks
trusted_networks:
- 192.168.0.0/24
- 192.168.10.0/24
- fd00::/8
trusted_users:
192.168.0.1: user1_id
192.168.0.0/24:
- user1_id
- user2_id
'fd00::/8':
- user1_id
- group: system-users

- type: trusted_networks
trusted_networks:
- 192.168.0.0/24
- 127.0.0.1
- ::1
allow_bypass_login: true

- type: command_line
command: /absolute/path/to/command
# Optionally, define a list of arguments to pass to the command.
#args: ["--first", "--second"]
# Uncomment to enable parsing of meta variables (see below).
#meta: true

FAQ

Home Assistant vs. Home Assistant Core