Hi, I am trying to create a tool for my partner to use with our son instead of her shouting up the stairs. As he normally has his headphones on while playing Fortnite.
So in her HA app, I have configured this card:
she selects a notification, like tea’s ready and then selects his bedroom show, which triggers the following automation.
It should snapshot his lights current state, increase the volume on his show, change the bedroom lights (group created in groups.yaml and under Light: in my config) to red and flash them (as he has his headphones on), speak the notification, decrease the volume on the show, restore the light snapshot, and change the Alex input_select back to None.
- id: '1611871238534'
alias: Jacks Alexa notifications
description: ''
trigger:
- platform: state
entity_id: input_select.alexa
condition: []
action:
- service: scene.create
data:
scene_id: before
snapshot_entities:
- group.jacks_bedroom
- delay: 00:00:01
- service: light.turn_on
data:
rgb_color:
- 255
- 0
- 0
brightness_pct: 100
flash: long
entity_id: group.jacks_bedroom
- delay: 00:00:02
- service: media_player.volume_set
data:
entity_id: media_player.bedroom_echo
volume_level: '0.8'
- delay: 00:00:02
- service: notify.alexa_media
data_template:
data:
type: tts
message: Hey Jack, {{states.input_select.jack_phrases.state }}
target: "{% if is_state('input_select.alexa', 'Dining Room') %}\n media_player.dining_room_show\n\
{% elif is_state('input_select.alexa', 'Jacks Bedroom') %}\n media_player.bedroom_echo\n\
{% elif is_state('input_select.alexa', 'Announce!') %}\n group.everywhere\n\
{% elif is_state('input_select.alexa', 'None') %}\n false\n{% else %}\n false\n\
{% endif %}\n"
- delay: 00:00:02
- service: scene.turn_on
entity_id: scene.before
- delay: 00:00:02
- service: input_select.select_option
data:
option: None
entity_id: input_select.alexa
- delay: 00:00:02
- service: media_player.volume_set
data:
entity_id: media_player.bedroom_echo
volume_level: '0.5'
mode: queued
max: 10
I did have the notification speech working before I put in the light code. But now the light snapshot is taken, the lights change to red and flash red and that is it. No, notification and the snapshot is not restored.
I added the delays as I had seen this as fixes on other peoples posts. I have also tried it as mode: single and queued and currently neither work. Although, queued worked when it was just the notification.
This is meant to be buying my major points with my partner, so I really need to get it working.
All help gratefully received. Thank you.