Shortly after dusk I’m sending the status of all of the doors in the house being open or shut. If they are all closed I’d like to send a unique sound to. I can’t seem to put the sound notification within the if then statments. the template won’t save it. What should i try? Or can you send me to an example?
Here’s the code that doesn’t work.
alias: Doors Status at dusk notification experiment
description: ""
trigger:
- platform: numeric_state
entity_id: sun.sun
attribute: elevation
below: -3
condition: []
action:
- service: notify.mobile_app_erics_iphone
data:
message: >-
Front/Gar Man Door {% if is_state("binary_sensor.houseinputsv4_0_2",
"off") -%}
Closed
{%- else -%}
*Open*
{%- endif %} {{ '\n' -}}
Rear Door {% if is_state("binary_sensor.houseinputsv4_0_3", "off") -%}
Closed
{%- else -%}
*Open*
{%- endif %} {{ '\n' -}}
Side Door {% if is_state("binary_sensor.houseinputsv4_0_4", "off") -%}
Closed
{%- else -%}
*Open*
{%- endif %} {{ '\n' -}}
Family Room Door Wall {% if is_state("binary_sensor.houseinputsv4_0_5",
"off") -%}
Closed
{%- else -%}
*Open*
{%- endif %} {{ '\n' -}}
Garage Car Door {% if is_state("binary_sensor.houseinputsv5_0_6", "off")
-%}
Closed
{%- else -%}
*Open*
{%- endif %} {{ '\n' -}}
data:
push:
{% if is_state("binary_sensor.houseinputsv4_0_2", "off") -%}
{% if is_state("binary_sensor.houseinputsv4_0_3", "off") -%}
{% if is_state("binary_sensor.houseinputsv4_0_4", "off") -%}
{% if is_state("binary_sensor.houseinputsv4_0_5", "off") -%}
{% if is_state("binary_sensor.houseinputsv5_0_6", "off") -%}
sound: Suspense.caf
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
Thanks as always for the help.