Hi All,
I had this automation below: Its trigger on state of
sensor.hacs
- id: "16625564-ef5e-4743-9586-29b33667bcc0"
alias: "Notification - HASC Update"
mode: restart
trigger:
- platform: state
entity_id: sensor.hacs
condition:
- condition: numeric_state
entity_id: sensor.hacs
above: 0
action:
- service: script.mobile_notify_no_actionable
data:
title: "HASC Updates"
message: "{{ trigger.to_state.attributes.friendly_name }} have {{ trigger.to_state.state }} updates"
thread_id: "system_notification"
I changed it to this way: Trigger on template.
Code is shorter:
- id: "16625564-ef5e-4743-9586-29b33667bcc0"
alias: "Notification - HASC Update"
mode: restart
trigger:
- platform: template
value_template: "{{ (states('sensor.hacs') > '0') }}"
action:
- service: script.mobile_notify_no_actionable
data:
title: "HASC Updates"
message: "{{ trigger.to_state.attributes.friendly_name }} have {{ trigger.to_state.state }} updates"
thread_id: "system_notification"
Can someone tell me If this way is trigger same way, or are there some things that will be different.
Otherwise I will update some other automations also to template trigger.
Cheers,
Peter