Hi there,
I created an automation. This should trigger an Alexa greeting every morning.
So far this has never been triggered. This morning I tested it again, unfortunately it doesn’t work.
What can be the reason?
Here the automation:
alias: Guten Morgen Bad
description: ''
trigger:
- type: motion
platform: device
device_id: 66dfc7837dc98ce07e01289bfdf5195f
entity_id: binary_sensor.lumi_lumi_sensor_motion_aq2_8190c306_ias_zone
domain: binary_sensor
condition:
- condition: time
after: '05:00'
before: '07:40'
- condition: template
value_template: >-
{{ now() - timedelta(hours=18) > state_attr('automation.guten_morgen_bad',
'last_triggered') }}
action:
- choose:
- conditions:
- condition: time
after: '05:00'
before: '06:15'
weekday:
- mon
sequence:
- service: notify.alexa_media_bad
data:
message: Guten Morgen Montag
data:
type: tts
- service: media_player.play_media
data:
media_content_id: Alexa.Joke.Play
media_content_type: sequence
target:
entity_id:
- media_player.bad
- conditions:
- condition: time
weekday:
- tue
after: '05:00'
before: '06:15'
sequence:
- service: notify.alexa_media_bad
data:
data:
type: tts
message: Guten Morgen Dienstag
- service: media_player.play_media
data:
media_content_id: Alexa.Weather.Play
media_content_type: sequence
target:
entity_id:
- media_player.bad
- conditions:
- condition: time
after: '05:00'
before: '06:15'
weekday:
- wed
sequence:
- service: notify.alexa_media_bad
data:
data:
type: tts
message: Guten Morgen Mittwoch
- service: media_player.play_media
data:
media_content_id: Alexa.GoodMorning.Play
media_content_type: sequence
target:
entity_id:
- media_player.bad
- conditions:
- condition: time
weekday:
- thu
after: '05:00'
before: '06:15'
sequence:
- service: notify.alexa_media_bad
data:
data:
type: tts
message: Guten Morgen Donnerstag
- service: media_player.play_media
data:
media_content_id: Alexa.Weather.Play
media_content_type: sequence
target:
entity_id:
- media_player.bad
- conditions:
- condition: time
after: '05:00'
before: '06:15'
weekday:
- fri
sequence:
- service: notify.alexa_media_bad
data:
message: Guten Morgen Freitag
data:
type: tts
- service: media_player.play_media
data:
media_content_id: Alexa.TellStory.Play
media_content_type: sequence
target:
entity_id:
- media_player.bad
- conditions:
- condition: time
weekday:
- sat
after: '06:00'
before: '07:55'
sequence:
- service: notify.alexa_media_bad
I’m grateful for any help.
Greetings Werner