i have a working automation but i want to get an condition in it
the automation may not do the google tts if the sun is below horizon so it doesn't wake me up in the night
but it may do the notify telegram things
Could anyone please make a change to my code?
alias: togoodtogobakkerijdemuynck
description: ""
mode: single
triggers:
- entity_id: sensor.tgtg_bakkerij_demuynck
for: "00:00:05"
trigger: state
conditions:
- condition: template
value_template: "{{ trigger.from_state.state|int(0) < trigger.to_state.state|int(0) }}"
actions:
- data:
message: Bakkerij Demunck heeft weer to good to go deals!
action: notify.parents
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 500
- data:
action:
- data:
language: nl
entity_id: media_player.alles
message: Bakkerij Demunck heeft weer to good to go deals!
cache: true
extra:
entity_id: media_player.alles
action: tts.google_say
action: script.google_home_resume
- data:
message: Bakkerij Demunck heeft weer to good to go deals!
action: notify.telegram_martine
so i only want the below horizon in the 2th action that does the media_player tts
Thanks on advance