I’m trying to write an automation that will have my two google mini’s greet me when I come home. Here’s what I have so far.
- id: '1539184197286'
alias: Welcome Home
trigger:
- entity_id: device_tracker.phone_phone
from: away
platform: state
to: home
condition: []
action:
- data:
entity_id: media_player.all_speakers
message: Hello Clay, welcome home!
service: tts.google_say
- delay: seconds 10
- data:
entity_id: media_player.all_speakers
service: media_player.turn_off
I have two problems. On the first manual trigger I hear the turn on dull chime but no message. I noticed that all_speakers turns on, but does not turn off. If I trigger it again while all_speakers is on it plays the message fine.
I suspect I may need a sequence here in which I turn all_speakers on, play the message and turn it off. This however is a little above my pay grade as I very new to this.
Could someone please help me fix this automation so it speaks at the first trigger and then turns all_speakers off? Maybe its not important to turn it off?
I cant seem to figure out why. I basically copied your code to see if it works at all before i adapt it, but i cant get the google homes to speak
Has anyone an Idea why?
Hello, I was trying to do exactly the same thing, but it is not working. I will first of all post my automation:
- id: '1578556095089'
alias: Hi Dario
description: Say hello when I come home
trigger:
- entity_id: device_tracker.honor_10_8f45ce529244b93
from: away
platform: state
to: home
condition: []
action:
- alias: ''
data: {}
entity_id: media_player.google_home_mini
service: media_player.turn_on
- delay: 00:00:02
- alias: ''
data:
entity_id: media_player.google_home_mini
message: Bentornato a casa Dario
service: tts.google_translate_say
- delay: 00:00:04
- entity_id: media_player.google_home_mini
service: media_player.turn_off
At first I noticed that the event doesn’t get triggered (the tracker is my wifi router, so i disabled my wifi, waited to be “away” on HA, then I turned on my wifi again and HA set me as “home” but the automation was not triggered.
I tried to manually trigger the automation but all i recognized was my google home turning on, but no welcome message.
What did I do wrong? Thank you very much in advance!
Dario
First mistake found! The tracker state ‘’‘away’’’ doesn’t exist, the correct one is ‘’‘not_home’’’. Now my automation gets triggered and i hear the google home turn on when i come back home, but it doesn’t say any message yet -.-
Second “mistake” found! The TTS service was not configured properly (I understood that it’s a common problem having SSL and Google Home devices)! Now I added a condition because I want the event to work only after a specific hour (10AM).
I was wondering if it’s possible to have the name of the person in the welcome message (“Welcome back Dario” or “Welcome back XYZ”) depending on the owner of the device that is tracked back home… Has anybody done that?