主页自动化辅助脚本



尝试配置我的第一个脚本

我的目标是如果我的加热器出现错误,自动发出警报…有很多类型的错误…唯一好的状态是E-00:OK’

只有当值<gt;以声明:";E-00:好的'

有办法做到这一点吗?

Script Yaml别名:&gt-E10加热器序列:

条件:状态entity_id:sensor.heater_error_string状态:";E-00:好的'模式:单个图标:mdi:散热器

是的,您可以创建服务器端自动化脚本,只有当您的文本传感器实体值从OK更改为任何其他值时才会触发该脚本。例如,您可以尝试:

automation:
trigger:
- platform: state
entity_id: sensor.heater_error_string
from:
- "E-00: OK"
action:
- service: notify.mobile_phone_app
data:
message: heater is not ok
title: Heater Notification
mode: single