yes, thanks!
so this means that depending on the indentation you can simply anchor anything. great. cut yet again a few lines, and make the editing so much less error prone. Thanks Marc.
<<: ¬ify_alarm
condition:
condition: state
entity_id: input_boolean.notify_alarm
state: 'on'
action:
service: notify.notify
data:
title: >
{% set mode = trigger.to_state.state|replace('_',' ')|capitalize %}
ALARM: {{mode}}
message: >
{% set mode = trigger.to_state.state|replace('_',' ')|capitalize %}
{{as_timestamp(now())|timestamp_custom('%X')}}: The alarm is in '{{mode}}' mode
could we use the new variables here? for the mode?
like:
<<: ¬ify_alarm
condition:
condition: state
entity_id: input_boolean.notify_alarm
state: 'on'
action:
variables:
mode: >
trigger.to_state.state|replace('_',' ')|capitalize
service: notify.notify
data:
title: >
ALARM: {{variables.mode}}
message: >
{{as_timestamp(now())|timestamp_custom('%X')}}: The alarm is in '{{variables.mode}}' mode