Moved merge to a Comment in the YAML

I LIKE THE ALTERNATIVE WAY OF DOING IT.   

Thanks for submitting!
This commit is contained in:
Carlo Costanzo 2020-04-27 10:13:32 -04:00 committed by GitHub
parent 71a6ecc280
commit 663d5617c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -20,8 +20,9 @@
{{ states.binary_sensor.kitchen_door.state == 'on' }}
- service: script.speech_engine
data_template:
# {% set person = state_attr(trigger.entity_id, "friendly_name")%} This is another way to do it.
personarriving: >
{% set person = state_attr(trigger.entity_id, "friendly_name")%}
{% set person = trigger.entity_id.split('.')[1]|replace('_', ' ')%}
{%- macro greeting_sentence(person) -%}
{{ [
"Welcome back home " ~ person,