Hi,
i am trying to set up a complex automation (for me). let me describe what it have to do:
when Ismart alarm through IFTTT is set on arm between 21:00 and 07:00
switch off all the lights except two lights (osram plug through hue seems like lights) that are used for usb mobile phone chargers.
If not in that time range the automation switch off all lights (also the osram plugs)
and in the mean time call TTS service on google home “alarm armed”
Here my script and automations:
- alias: spegnitutto
#initial_state: true
trigger:
- platform: event
event_type: ifttt_webhook_received
webhook_id: spegnitutto
action:
- service: script.turn_on
entity_id: script.allarme_inserito_webhook
condition:
condition: and
conditions:
- condition: time
after: '21:00:00'
before: '07:00:00'
allarme_inserito:
alias: "allarme inserito"
sequence:
- service: tts.google_say
entity_id: media_player.google_home_mini_sala
data_template:
message: "allarme inserito"
language: it
cache: false
allarme_inserito_webhook:
alias: "allarme inserito webhook"
sequence:
- alias: spegni luci
service: homeassistant.turn_off
data:
entity_id: group.luci
- alias: accendi alimentatore1
service: light.turn_on
data:
entity_id: light.alimentatore_cellulare1
- alias: accendi alimentatore2
data:
service: light.turn_on
entity_id: light.alimentatore_cellulare2
I would like to merge the scripts and call them with the automation.
Thanks to anyone who can help me.
Marco