跳至正文
Wener Notes

Home Assistant

约 2 分钟阅读
bash
# 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

配置

yaml
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

关联信息

反向链接、本文链接的其他页面和外部资料。

反向链接

  • 学而思小喵掌机
    笔记 · Home Assistant

    XiaoMiao / 小喵掌机;Wener 实机外观和 PCB 对照确认与 KittenBot MeowBit v1 / 同版硬件高度一致。 · 主控:ESP32 · 外设:TFT、MicroSD、6 键、无源蜂鸣器、ADC 光照/热敏传感器、I2C、UART0

参考资料

GitHub1 条
其他外链6 条
最近更新commit a5e4638编辑