Hi every all
i am newbie, i want create a automation notify time every hour to Google Home Mini
example:
There is a file “ting.mp3” stored in config / media. At 13 o’clock, a message will be output to the speaker: “(Ting) … Now is 1 pm”. Notifications only play from 7am to 10pm daily.
Thanks for bro !
id: ‘160296927703618’
alias: Notify Clock
initial_state: true
trigger:
platform: time
minutes: ‘00’
seconds: ‘00’
condition:
condition: time
after: ‘07:30:00’
before: ‘22:30:00’
action:
service: tts.google_translate_say
data_template:
entity_id: media_player.phong_khach, media_player.phong_ngu
language: ‘en’
message: >
Time is {{datetime.hour}} hour !!
tom_l
October 28, 2020, 5:03pm
2
You can adapt this. I use it to play through a chromecast audio.
I have created a simple Grand Father Clock Chime in Home Assistant.
Sound will play through the speakers connected via 3.5mm head phone jack in Raspberry Pi.
It will play the chime every hour with the hour count.
Home Assistant Configuration yaml file entries:
shell_command:
ttschime: '/home/homeassistant/.homeassistant/TTS_Chime.sh'
automation 9:
- alias: 'Grand Father Clock'
trigger:
platform: time
minutes: 59
seconds: 59
condition:
condition: ti…
I want to announce by voice TTS
tom_l
October 29, 2020, 4:05am
4
Try this
trigger:
platform: time_pattern
minutes: '0'
seconds: '0'
condition:
condition: time
after: '07:30:00'
before: '22:30:00'
action:
service: tts.google_translate_say
data:
entity_id: media_player.phong_khach, media_player.phong_ngu
language: 'en'
message: >
Time is {{datetime.hour}} hour !!
Unless you are on v0.115 or earlier then data:
should be data_template:
.
You had two issues:
Using a time trigger instead of a time_pattern trigger.
See the big yellow warning here: https://www.home-assistant.io/docs/automation/trigger/#time-pattern-trigger
2 Likes
Thanks bro very much, I’m done