0

Trying to config my first script

My goal is to automate an alert if my heater is in Error… there are many type error … The only state that is good is E-00: OK’

i would like to trigger the script only if the value is <> to state: "E-00: OK’

Is there a way to do that?

Script Yaml alias: >- Heater E10 sequence:

condition: state entity_id: sensor.heater_error_string state: "E-00: OK’ mode: single icon: mdi:radiator

PW43575
  • 1
  • 1

1 Answers1

0

Yes, you can create server-side automation script which is triggered only when your text sensor entity value changes from OK to any other. For example, you may try:

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