Hi there, I’m fairly new to HA and so far I have only implemented automations via the visual editor.
I basically would like to create an automation that when motion is detected, HA is announcing the current time or on a smart speaker. I’ve been reading for hours through all kind of HA community sites but I’m stuck.
Where do I start ? Do I need to create a script, a template ? Do I need to create a sensor ? Add something to the configuration.yaml ?
I saw that I need to add somewhere: It’s {{ now().strftime(’%-I:%M’) }} but where?
So far I have added the following to the configuration.yaml
Text to speech
tts:
- platform: google_translate
Example configuration.yaml entry
sensor:
- platform: time_date
display_options:- ‘time’
- ‘date’
- ‘date_time’
- ‘date_time_utc’
- ‘date_time_iso’
- ‘time_date’
- ‘time_utc’
- ‘beat’
But what is next ? I’m lost here.
Besides, the tts service is running fine, for instance I’m running an automation to announce the time when it’s 8 o’clock and my homepod plays it
action:
- service: media_player.play_media
target:
entity_id: media_player.homepod_white
data:
media_content_id: media-source://tts/google_translate?message=it%27s+8+o%27clock
media_content_type: provider
metadata:
title: it’s 8 o’clock
thumbnail: https://brands.home-assistant.io/_/google_translate/logo.png
media_class: app
children_media_class: null
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://tts
- media_content_type: provider
media_content_id: media-source://tts/google_translate?message=it%27s+8+o%27clock
enabled: true
I would be really grateful if someone could guide me (for dummies) which steps I have to take to make HA announce the current time. Many thanks