不可用時觸發警報
platform: state
entity_id:
- switch.cuco_wp5_9f24_switch
to: unavailable
for:
hours: 0
minutes: 5
seconds: 0

訊息變數
https://www.home-assistant.io/docs/configuration/templating/#states
{{ states.sensor.temperature_sensor_8107.state }}
{{ states.binary_sensor.water_leak_sensor_2a66.state }}
{% if states.binary_sensor.water_leak_sensor_2a66.state in ("off", "off2") %}
積水偵測器:正常
{% else %}
積水偵測器:異常({{ states.binary_sensor.water_leak_sensor_2a66.state }})
{% endif %}
{% for state in states %}
{{ state.entity_id }}={{ state.state }},
{% endfor %}
docker安裝
apt install docker.io
docker run -d --name homeassistant --privileged --restart=unless-stopped -e TZ=Asia/Taipei -v /PATH_TO_YOUR_CONFIG1:/config --network=host ghcr.io/home-assistant/home-assistant:stable