Hi All,
Can someone help me out? I think I can’t see the problem anymore. This part of automation is not woking
When automation has been triggered after 10 seconds the script is going on. It won’t wait for the wait part that the front door has been status ‘on’
entity
friendly_name: Fibaro Frontdoor
device_class: door
templates:
icon_color: >-
if (state === 'on') return 'rgba(251,214,67,1)'; return
'rgba(71,116,157,1)';
icon_color: 'rgba(71,116,157,1)'
state
on
automation part
action:
- wait_template: >-
{{ (states("binary_sensor.fibaro_frontdoor_custom_sensor") == 'on') }}
- delay: "00:00:10"
full automation:
###########################################################################################
# NOTIFY and GREETS PERSON WHO WENT HOME
###########################################################################################
- alias: "Notify - Greets People Home"
trigger:
- platform: state
entity_id:
- input_boolean.peter_home_manual
- input_boolean.kay_home_manual
from: "off"
to: "on"
action:
- wait_template: >-
{{ (states("binary_sensor.fibaro_frontdoor_custom_sensor") == 'true') }}
- delay: "00:00:10"
###########################################################################################
# GROUP.ARRIVING is created in create_arrive_group.yaml
###########################################################################################
- service: script.engine_say
data_template:
personarriving: >-
{% set person = expand('group.arriving')|map(attribute='name')|join(' and ') %}
{% set peoplecount = expand('group.arriving') | count %}
{% if peoplecount == 1 %}
{% set is_are = ' is ' %}
{% else %}
{% set is_are = ' are ' %}
{% endif %}
{%- macro greeting_sentence(person, is_are) -%}
{{ [
"Welcome back home " ~ person,
"You had me at hello " ~ person,
"Guess who is home? " ~ person ~ is_are ,
"The wifi just got a little more crowded. Welcome Home " ~ person,
"Welcome Home " ~ person + ". We have missed you. Or at least Molly did.",
"Our home is now complete, Rest your head and relax your feet! Welcome Back " ~ person,
"Life is like a song, you’re back where you belong. Welcome home " ~ person,
"Hey there " ~ person + " Welcome Home!",
"Knock Knock. Who is There? " ~ person ~ is_are ,
"The front door just told me that " ~ person ~ is_are +" home.",
"I know a secret! " ~ person ~ is_are +" home!",
"Hey " ~ person +". Your arrival has been recorded by the Smartest house on the block.",
"Take note Molly! " ~ person ~ is_are +" home.",
"I am sensing a disturbance in the force. " ~ person +" must be home!",
"And the house becomes a home. Welcome back " ~ person,
"Just a quick announcement. " ~ person +" has arrived!",
"Hey " ~ person + "! High Five! Glad you are finally home.",
"Pardon the interruption but " ~ person ~ is_are +" home!",
"My systems are picking up the presence of additional humans. " ~ person ~ is_are +" being identified as home.",
"Welcome home "~person + "! It is nice to see you again! Let me turn on the lights. ",
"It looks like "~person ~ is_are + " finally home! I will get the house ready for you. ",
person ~ is_are + " now in the house.",
person + " can not hide from the system. Welcome home.",
person ~ "! You are home!",
person ~ is_are + " now here. Hash tag Welcome Home.",
person ~ is_are + " now here. Hash tag Home.",
person ~ is_are + " now here. Hash tag Smart Home."
] | random }}
{%- endmacro -%}
{{greeting_sentence(person, is_are)}}
- service: group.set
data_template:
object_id: "arriving"
entities: []