I want an Amazon Echo device to say the time once an hour on the hour during the day. I have been able to get it to “say” a message, but not the time. This code works perfectly.
alias: Notification - Time announce
description: ""
trigger:
- platform: time_pattern
minutes: "0"
seconds: "0"
condition:
- condition: time
after: "07:58:00"
before: "19:00:00"
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
action:
- service: tts.cloud_say
metadata: {}
data:
cache: true
entity_id: media_player.sitting_room_echo
message: "hi di hi"
I do have default_config: in my config.yaml file. I have created a helper (see below), but if I replace the last line above with …
message: "The time is {{input_datetime.time_announce}} o'clock"
… then I get a trace error
Error rendering data template: UndefinedError. 'input_datetime' is undefined
Where am I going wrong? Many thanks!