Hello, I am trying to get my google home to say hello to the person who gets home. So far I have to person connected via tracker. I thought I found the way to do it, but it says me “Hallo Trigger Entity Id…”, it doesn’t decode what is inside the {{ trigger.entity_id.attributes.friendly_name }}
here is my full automation right now:
- id: '1578556095089'
alias: Welcome Home
trigger:
- entity_id: device_tracker.honor_10_8f45ce529244b93
from: not_home
platform: state
to: home
- entity_id: device_tracker.android_glorita
from: not_home
platform: state
to: home
condition:
- after: '10:00:00'
condition: time
action:
- entity_id: media_player.google_home_mini
service: media_player.turn_on
- delay: 00:00:02
- data:
entity_id: media_player.google_home_mini
message: Hallo {{ trigger.entity_id.attributes.friendly_name }}
service: tts.google_say
- delay: 00:00:04
- entity_id: media_player.google_home_mini
service: media_player.turn_off
the tts.google._say was “suggested” me by Home Assistant Automation creator after i set my configuration.yaml as in the example here: https://www.home-assistant.io/integrations/tts/
Anyway now I have removed “service_name: google_say” and the Automation creator actually says me that the service is named tts.google_translate_say.
But my problem is still the same: as soon as I replace the data with data_template my google home doesn’t say anything anymore (but it turns on), while if I set data then it says “Hallo trigger entity…”
- id: '1578556095089'
alias: Welcome Home
trigger:
- entity_id: device_tracker.honor_10_8f45ce529244b93
from: not_home
platform: state
to: home
- entity_id: device_tracker.android_glorita
from: not_home
platform: state
to: home
condition: []
action:
- data:
message: test
title: test1
service: notify.mobile_app_dario_s_col_l29
- entity_id: media_player.google_home_mini
service: media_player.turn_on
- delay: 00:00:02
- data_template:
entity_id: media_player.google_home_mini
message: "Hallo {{ trigger.entity_id.attributes.friendly_name }}"
service: tts.google_translate_say
- delay: 00:00:04
- entity_id: media_player.google_home_mini
service: media_player.turn_off
I tried to add the " " at the beginning and end of the message cause I read in another post that it was important but it has no effect to me… What am I doing wrong?