Recreating the Emergency Party Button - Or at least trying to

I am working in recreating the Emergency Party Button [Emergency Party Button https://www.youtube.com/watch?v=nZIfIzNW9xM. It’s going to include

  1. Alexa countdown
  2. Hue lights
  3. Disco Light (connected to a smart plug)
  4. Sonos (playing What is Love)
  5. Fog Machine
  6. LaMetric Time
  7. Nanaoleaf

Issue : I have the code below as an automation to countdown and switch off the lights but it doesnt appear to be running in sequence. Essentially most of the 5 pendant lights go off (in one second delays) but Alexa doesnt start speaking until after.

Is there a better (and quicker) way for me to send tts to Alexa (or Sonos)?

alias: HA Emergency Party Button
description: ''
trigger: []
condition: []
action:
  - type: turn_off
    device_id: dd69c1c3f72c4393b60946cbf8546886
    entity_id: light.pendant_1
    domain: light
  - service: notify.alexa_media_kitchen_echo
    data:
      message: Five
      data:
        type: tts
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - type: turn_off
    device_id: fdf0127c244c481fb8be734f5e472cef
    entity_id: light.pendant_2
    domain: light
  - service: notify.alexa_media_kitchen_echo
    data:
      message: Four
      data:
        type: tts
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - type: turn_off
    device_id: 3b5fd3bf56ab4c79ad0d01e8d764186b
    entity_id: light.pendant_3
    domain: light
  - service: notify.alexa_media_kitchen_echo
    data:
      message: Three
      data:
        type: tts
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - type: turn_off
    device_id: ccdfbb34c334416cb7bc7ec529eab172
    entity_id: light.pendant_4
    domain: light
  - service: notify.alexa_media_kitchen_echo
    data:
      message: Two
      data:
        type: tts
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - type: turn_off
    device_id: adfc901d5f6a4b95a3bb1e8071a84049
    entity_id: light.pendant_5
    domain: light
  - service: notify.alexa_media_kitchen_echo
    data:
      message: One
      data:
        type: tts
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - service: notify.alexa_media_kitchen_echo
    data:
      message: One
      data:
        type: tts
mode: single

Umm, you have two identical automations and neither have a trigger :man_shrugging:

And no, it takes a ‘little while’ for tts to be generated so its not going to work like that. A better way would be to get an mp3 with a 5 second countdown, start playing that and then turn off the lights in sequence.

1 Like

re two automations - That might have been me being a little fat-fingered. I only have automation, will have a trigger soon for it but for now I execute manually :slight_smile:

re countdown. Great tip, will give that a try!

Thanks for your help!

1 Like