Halloween Light Flickering Blueprint

Does anyone have any blueprints for capturing a light’s current state, then going through a flicker effect, then restoring it in a convincing spooky way? I should have asked last night lol.
I made something in Node-Red but it looks very stiff, like a traffic signal late at night.

Thanks if anyone has anything.

1 Like

Bumping this thread for this year.

Bumping this thread for this year.

1 Like

I made a “dumb” node-red flow that doesn’t capture a scene.
I still really dislike scenes.
Maybe I’ll try to work on this now that I’ve learned a few things.

Heartbroken that the only replies to this are people bumping it :broken_heart:

Yea if I were an expert coder I would write an add-on or something that allowed you to create color patterns that you could schedule to execute on lights you could select. Add in WLED integration and stuff.

Hi guys!
I just use the toggle option on the lights and a delay between them. If you have a sensor or a button that can be your trigger. If you have rgb lights, turn them orange. Then I put a hidden speaker and play a scary sound! Feel free to ask for details.

Last year I used the following script to let my light randomly go on and off. The light.lights_halloween entity is a light group.

alias: "Fun: Halloween"
sequence:
  - repeat:
      while:
        - condition: state
          entity_id: input_boolean.this_is_halloween
          state: "on"
      sequence:
        - service: light.toggle
          data:
            entity_id: "{{ state_attr('light.lights_halloween','entity_id') | random }}"
        - delay: 00:00:0{{ range(3,9) | random | int }}
mode: single
icon: mdi:halloween
1 Like

I wanted something similar last night, so pasting it here in case it helps someone in time for halloween. It’s rough, and could definitely be improved upon. It was surprisingly difficult to get Home Assistant working with a bluetooth speaker, but this is what I did to get motion triggered Spooky sounds and lightning!

Bits and bobs needed:

  • Zigbee Motion Sensor (LIkely works with whatever motion sensor you have to hand)
  • Hue Lights (May work with other lights)
  • Bluetooth wireless speaker (to hide in the hedge)
  • A dedicated Raspberry Pi to connect to the bluetooth speaker. (I used a 3B+)
  • Node-Red integration
  • A bunch of spooky sounds (I used this as the sound that plays when the lights flash)

Basic Premise:
We’re going to use the motion sensor to trigger a node-red flow that will trigger some hue lights to flash and play some sounds from a hidden bluetooth speaker.

Steps I took:

1. Install the Zigbee Motion Sensor. (Skip if you’ve already got one working.)

2. Install the Lights. (Skip if you’ve already got one or more working.)

3. Setting up a new volumio instance on your network

The hardest part for me was getting something that would allow HomeAssistant to make noise over a bluetooth speaker with sufficiently low latency. I eventually landed on a working solution with volumio running on a dedicated raspberry pi. (I tried Mopidy and MPD on raspbian with low success rates when trying to get bluetooth working. Appreciate that Volumio is using MPD, but the permissions all appear to be setup so it works, if you follow the steps below.)

To do this you can use the standard Raspberry Pi Imager to burn an instance onto a fresh SD card in a Raspberry Pi. The initial setup instructions here work pretty much fine, with some minor differences, but I had no issues burning this onto a Pi with no ethernet and did everything wirelessly.

N.B. You will need to ensure that SSH is enabled on the Volumio so you can access it remotely

Once you have setup Volumio and you’ve checked (using the headphone jack) that it can play audio locally (I used a radio stream to test this.) You should be set to upload the sounds you want to use. You should be able to find you volumio on the network with the name you chose and it exposes its filesystem as a network share e.g. \volumio\internal . Just drag your sound files across from your local machine and check they play.

4. If it hasn’t already appeared in HomeAssistant you just need to add your Volumio device. (Add Integration ‘volumio’.) This will register a media player entity that you can use from Home Assistant (Almost there!)

5. Deploy a node red-flow that wires it all together. I’ve expanded out some bits here to make it clearer what’s happening. But the flow ‘exposes itself as a button on the interface’, ‘reacts to motion events’ and randomly chooses to either ‘just play a sound’ or ‘creates lightning and plays a thunder crack sound’.

The flow JSON is:

[{"id":"6163fb7697b2ca3b","type":"tab","label":"Halloween","disabled":false,"info":"","env":[]},{"id":"f21ddcec254e88fb","type":"api-call-service","z":"6163fb7697b2ca3b","name":"Light Flash","server":"6fbe91ef.20338","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.main_living_room_ceiling","light.signify_netherlands_b_v_lct010_light","light.signify_netherlands_b_v_lct015_light_6"],"data":"{\"rgbww_color\":[255,255,255,255,255]}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":670,"y":200,"wires":[["2b79e45c5bf9615c"]]},{"id":"f6c953ea3306e764","type":"inject","z":"6163fb7697b2ca3b","name":"TestFlow","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":80,"y":340,"wires":[["9d57a186db3d69c2"]]},{"id":"2b79e45c5bf9615c","type":"api-call-service","z":"6163fb7697b2ca3b","name":"Light Flash off","server":"6fbe91ef.20338","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.main_living_room_ceiling","light.signify_netherlands_b_v_lct010_light","light.signify_netherlands_b_v_lct015_light_6"],"data":"{\"transition\":0.1}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":880,"y":200,"wires":[["a8a15050e839ab48"]]},{"id":"a8a15050e839ab48","type":"api-call-service","z":"6163fb7697b2ca3b","name":"Light Flash","server":"6fbe91ef.20338","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.main_living_room_ceiling","light.signify_netherlands_b_v_lct010_light","light.signify_netherlands_b_v_lct015_light_6"],"data":"{\"rgbww_color\":[255,255,255,255,255]}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1130,"y":200,"wires":[["d456f15c5fc21d4d"]]},{"id":"d456f15c5fc21d4d","type":"api-call-service","z":"6163fb7697b2ca3b","name":"Light Flash off","server":"6fbe91ef.20338","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.main_living_room_ceiling","light.signify_netherlands_b_v_lct010_light","light.signify_netherlands_b_v_lct015_light_6"],"data":"{\"transition\":0.5}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1360,"y":200,"wires":[[]]},{"id":"918fe9cc34a663dc","type":"ha-device","z":"6163fb7697b2ca3b","name":"Motion Detected","server":"6fbe91ef.20338","version":1,"exposeAsEntityConfig":"","inputs":0,"deviceType":"trigger","device":"de298413d08013aa68db4aa04e9f2405","event":{"type":"motion","platform":"device","device_id":"de298413d08013aa68db4aa04e9f2405","entity_id":"277eb2175ca044257a0574b63e913cde","domain":"binary_sensor","metadata":{"secondary":false}},"capabilities":[],"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":420,"wires":[["9d57a186db3d69c2"]]},{"id":"a0d851079e66a470","type":"api-call-service","z":"6163fb7697b2ca3b","name":"Play Sound","server":"6fbe91ef.20338","version":5,"debugenabled":false,"domain":"media_player","service":"play_media","areaId":[],"deviceId":[],"entityId":["media_player.hedgeplayer_2"],"data":"{\t    \"media_content_id\":\"{\\\"service\\\": \\\"mpd\\\", \\\"type\\\": \\\"song\\\", \\\"title\\\":\\\"\" & msg.payload &\"\\\", \\\"uri\\\":\\\"music-library/INTERNAL/\" & msg.payload &\"\\\"}\"\t,\"media_content_type\":\"music\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1370,"y":320,"wires":[[]]},{"id":"9d57a186db3d69c2","type":"random","z":"6163fb7697b2ca3b","name":"","low":1,"high":"3","inte":"true","property":"payload","x":320,"y":340,"wires":[["2a625920d67265ed"]]},{"id":"2a625920d67265ed","type":"switch","z":"6163fb7697b2ca3b","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"3","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":470,"y":340,"wires":[["f21ddcec254e88fb","8208ef241593b711"],["19c70fac787b4a98"],["19c70fac787b4a98"]]},{"id":"19c70fac787b4a98","type":"random","z":"6163fb7697b2ca3b","name":"","low":1,"high":"6","inte":"true","property":"payload","x":560,"y":480,"wires":[["36d9fe29a721ad2f"]]},{"id":"36d9fe29a721ad2f","type":"switch","z":"6163fb7697b2ca3b","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"3","vt":"str"},{"t":"eq","v":"4","vt":"str"},{"t":"eq","v":"5","vt":"str"},{"t":"eq","v":"6","vt":"str"}],"checkall":"true","repair":false,"outputs":6,"x":690,"y":480,"wires":[["a03f92c179aaf198"],["d1a1d6882e515d7b"],["192c7e1b1db1c1bb"],["72089461f673a0aa"],["6606510e147dd194"],["5c4ed2450f67a48e"]]},{"id":"8208ef241593b711","type":"change","z":"6163fb7697b2ca3b","name":"thunder-crack-31702.mp3","rules":[{"t":"set","p":"payload","pt":"msg","to":"thunder-crack-31702.mp3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":710,"y":320,"wires":[["a0d851079e66a470"]]},{"id":"72089461f673a0aa","type":"change","z":"6163fb7697b2ca3b","name":"wolf-howling-140235.mp3","rules":[{"t":"set","p":"payload","pt":"msg","to":"wolf-howling-140235.mp3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1120,"y":560,"wires":[["a0d851079e66a470"]]},{"id":"6606510e147dd194","type":"change","z":"6163fb7697b2ca3b","name":"boo-and-laugh-7060.mp3","rules":[{"t":"set","p":"payload","pt":"msg","to":"boo-and-laugh-7060.mp3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1130,"y":600,"wires":[["a0d851079e66a470"]]},{"id":"5c4ed2450f67a48e","type":"change","z":"6163fb7697b2ca3b","name":"owl-2-139676.mp3","rules":[{"t":"set","p":"payload","pt":"msg","to":"owl-2-139676.mp3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1150,"y":640,"wires":[["a0d851079e66a470"]]},{"id":"192c7e1b1db1c1bb","type":"change","z":"6163fb7697b2ca3b","name":"creepy-halloween-horror-voice-run-vol-006-165226.mp3","rules":[{"t":"set","p":"payload","pt":"msg","to":"creepy-halloween-horror-voice-run-vol-006-165226.mp3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1030,"y":520,"wires":[["a0d851079e66a470"]]},{"id":"d1a1d6882e515d7b","type":"change","z":"6163fb7697b2ca3b","name":"halloween-witch-sound-creepy-laughter-9-vol-001-159177.mp3","rules":[{"t":"set","p":"payload","pt":"msg","to":"halloween-witch-sound-creepy-laughter-9-vol-001-159177.mp3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1010,"y":480,"wires":[["a0d851079e66a470"]]},{"id":"a03f92c179aaf198","type":"change","z":"6163fb7697b2ca3b","name":"horror-sound-possessed-5-run-away-girl-vol-001-167388.mp3","rules":[{"t":"set","p":"payload","pt":"msg","to":"horror-sound-possessed-5-run-away-girl-vol-001-167388.mp3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1010,"y":440,"wires":[["a0d851079e66a470"]]},{"id":"e577fe7a0ac6a661","type":"ha-button","z":"6163fb7697b2ca3b","name":"SpookyDoorSound","version":0,"debugenabled":false,"outputs":1,"entityConfig":"436737764cfd3da4","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":130,"y":260,"wires":[["9d57a186db3d69c2"]]},{"id":"6fbe91ef.20338","type":"server","name":"Home Assistant","addon":true},{"id":"436737764cfd3da4","type":"ha-entity-config","server":"6fbe91ef.20338","deviceConfig":"be12b2152558955d","name":"SpookyDoorSound","version":"6","entityType":"button","haConfig":[{"property":"name","value":"SpookyDoorSound"},{"property":"icon","value":""},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":""}],"resend":false,"debugEnabled":false},{"id":"be12b2152558955d","type":"ha-device-config","name":"SpookyDoorSound","hwVersion":"","manufacturer":"Node-RED","model":"","swVersion":""}]

6. Go mad trying to diagnose why it isn’t working.
If you get to here, I found using the developer tools to inject a service was pretty helpful in diagnosing the issue. This post has a working example that I found very helpful.

7. Setup Volumio to use a bluetooth speaker.
The next bit is ropey, to say the least, but through a combination of the following posts I was able to get my volumio to use a wireless bluetooth speaker: here, here and here. This is not for the particularly faint-hearted and I recommend reading all three posts before commencing on it or you’ll find the last post has you reworking the contents of one of the downloads in the first post (you’re welcome :wink: ).

Hope this helps someone, appreciate the detail isn’t all there in this post, but the linked posts should cover all you need! Happy Halloween :ghost::jack_o_lantern: xx

1 Like

Yea I ended up with this last year and have been using it this year.


There’s a play thunder spooky sound part too in another loop.
Too bad it’s going through a Google Home so it has to do the startup beep some times and I don’t feel like setting up a keep awake script.
Maybe I will this afternoon.
Oh and I used Volumio last year, pretty neat, just too much exposed to weather.

Re. Weather exposure, totally agree, which is why I needed the bluetooth speaker element, the speaker is waterproof :joy:

I might change mine to default to orange/color-looping, I like that.

Sorry to the Volumio people I didn’t feel like paying for Bluetooth for one month out of the year…

This BP flickers the light for a few seconds, then does a “lightning flash” before repeating/.

To use it, create a new Helper toggle called halloween_show, then add this blueprint.

Change the target light to the entity of your choice, in my case it is light.hue_lightstrip_outdoor_1.

Save it, then flip the toggle on, enjoy.

ezgif.com-gif-maker

alias: Halloween Show
description: "Candle Flicker and Lightning"
trigger:
  - platform: state
    entity_id:
      - input_boolean.halloween_show
    to: "on"
condition: []
action:
  - repeat:
      sequence:
        - repeat:
            count: 20
            sequence:
              - service: light.turn_on
                data:
                  transition: 0.5
                  brightness: "{{ (range(1, 255)|random) }}"
                  color_temp: "{{ (range(400, 500)|random) }}"
                target:
                  entity_id: light.hue_lightstrip_outdoor_1
              - delay:
                  hours: 0
                  minutes: 0
                  seconds: 0
                  milliseconds: "{{ (range(200, 700)|random) }}"
        - service: light.turn_on
          data:
            transition: 0
            brightness: 255
            rgb_color:
              - 255
              - 255
              - 255
          target:
            entity_id: light.hue_lightstrip_outdoor_1
        - delay:
            hours: 0
            minutes: 0
            seconds: 0
            milliseconds: 25
        - service: light.turn_on
          data:
            transition: 0
            brightness: 0
            rgb_color:
              - 255
              - 255
              - 255
          target:
            entity_id: light.hue_lightstrip_outdoor_1
        - delay:
            hours: 0
            minutes: 0
            seconds: 0
            milliseconds: 25
        - service: light.turn_on
          data:
            transition: 0
            brightness: 255
            rgb_color:
              - 255
              - 255
              - 255
          target:
            entity_id: light.hue_lightstrip_outdoor_1
      while:
        - condition: state
          entity_id: input_boolean.halloween_show
          state: "on"
mode: restart
3 Likes

Err, I guess I missed something as I just used the free volumio account ?

Here’s an automation I fiddled around with tonight.
There’s an Aqara Door Sensor on the front door, a coloured light just inside the front door, and a hall light behind that.
When you open the door the hall light goes off, the front door light starts flickering between red/orange/yellow/green (mostly red and orange).
When you close the door it goes back to plain green and the hall light comes back on.
There’s a 31 October condition with sun below horizon too so no need to disable/enable it.

alias: Halloween Front Door Light Flicker
description: ""
trigger:
  - type: opened
    platform: device
    device_id: 3f07826df72a873ea71d33cebb9df527
    entity_id: ef1263b11c028a6b84cdecc554b6f6e8
    domain: binary_sensor
condition:
  - condition: template
    value_template: "{{ now().month == 10 and now().day == 31 }}"
  - condition: sun
    after: sunset
action:
  - service: light.turn_off
    data: {}
    target:
      entity_id: light.entrance_hall
  - service: light.turn_on
    data:
      brightness: 255
      rgb_color:
        - 255
        - 50
        - 0
    target:
      entity_id: light.front_door_light
  - repeat:
      sequence:
        - type: toggle
          device_id: 3d0bccf7853324d2a2857eadd4e5787b
          entity_id: 692a12b9c0f8ec6d3450b24081a073ee
          domain: light
          enabled: false
        - service: light.turn_on
          data:
            rgb_color:
              - "{{ range(0, 255)|random|int }}"
              - "{{ range(0, 100)|random|int }}"
              - 0
            brightness_pct: "{{ range(0, 100)|random|int }}"
          target:
            entity_id: light.front_door_light
        - delay:
            hours: 0
            minutes: 0
            seconds: 0
            milliseconds: "{{ range(50, 300)|random|int }}"
      until:
        - condition: state
          entity_id: binary_sensor.aqara_door_sensor_front_door_contact
          state: "off"
  - service: light.turn_on
    data:
      brightness: 255
      rgb_color:
        - 0
        - 255
        - 158
    target:
      entity_id: light.front_door_light
  - service: light.turn_on
    data:
      brightness_pct: 100
    target:
      entity_id: light.entrance_hall_lights
mode: single
5 Likes

When I’ve tried volumio Bluetooth was locked behind a paid subscription. Tried last year and rolled with a wire. Tried this year and abandoned it.

1 Like

Ah, it may have been, the instructions I provided are for some sort of hacky/roll-your-own bluetooth approach (since I couldn’t get passed weird permissions issues with vanilla mpd at silly o’clock in the morning!), but it was all zero-cost :slight_smile:

1 Like

I modified the code of @WelshProgrammer a little to give that small flicker like you see in fluorescent tubes. It randomly flickers a short 3-7 times in a random interval between15 and 30 seconds.

alias: Halloween Show Utelampe
description: Candle Flicker and Lightning
trigger:
  - platform: state
    entity_id:
      - input_boolean.halloween_show
    to: "on"
  - platform: state
    entity_id:
      - input_boolean.halloween_show
    to: "off"
condition: []
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: input_boolean.halloween_show
            state: "on"
        sequence:
          - repeat:
              sequence:
                - action: light.turn_on
                  data:
                    brightness_pct: 100
                    kelvin: 3000
                  target:
                    entity_id: light.utelampe
                - delay:
                    seconds: "{{ range(15, 30) | random }}"
                - repeat:
                    count: "{{ [3, 5, 7] | random }}"
                    sequence:
                      - action: light.turn_on
                        data:
                          transition: 0
                          brightness: "{{ range(180, 255) | random }}"
                          kelvin: 3000
                        target:
                          entity_id: light.utelampe
                      - delay:
                          milliseconds: "{{ range(25, 150) | random }}"
                      - action: light.turn_on
                        data:
                          transition: 0
                          brightness: "{{ range(25, 150) | random }}"
                          kelvin: 3000
                        target:
                          entity_id: light.utelampe
                      - delay:
                          milliseconds: "{{ range(25, 150) | random }}"
                - action: light.turn_on
                  data:
                    kelvin: 3000
                    brightness_pct: 100
                  target:
                    entity_id: light.utelampe
              while:
                - condition: state
                  entity_id: input_boolean.halloween_show
                  state: "on"
      - conditions:
          - condition: state
            entity_id: input_boolean.halloween_show
            state: "off"
        sequence:
          - action: light.turn_on
            data:
              kelvin: 3000
              brightness_pct: 100
            target:
              entity_id: light.utelampe
mode: restart
1 Like

This worked well for me tonight with the use of CHATGPT.

6 x Philips Hue on the driveway and 1 Innr light in the porch.

Sound effects downloaded from YouTube.

alias: Driveway Halloween
description: >-
triggers:
  - entity_id: input_boolean.halloween_show
    to: "on"
    trigger: state
conditions: []
actions:
  - repeat:
      count: 3
      sequence:
        - data:
            entity_id:
              - light.driveway
              - light.dimmable_light_1
            brightness: 80
          action: light.turn_on
        - delay:
            milliseconds: 300
        - data:
            entity_id:
              - light.driveway
              - light.dimmable_light_1
          action: light.turn_off
        - delay:
            milliseconds: 200
        - data:
            entity_id:
              - light.driveway
              - light.dimmable_light_1
            brightness: 120
          action: light.turn_on
        - delay:
            milliseconds: 200
        - data:
            entity_id:
              - light.driveway
              - light.dimmable_light_1
          action: light.turn_off
        - delay:
            milliseconds: 100
        - data:
            entity_id: media_player.garage_speaker
            media_content_id: /local/halloween.mp3
            media_content_type: audio/mpeg
          action: media_player.play_media
        - repeat:
            count: 4
            sequence:
              - data:
                  entity_id:
                    - light.driveway
                    - light.dimmable_light_1
                  brightness: 255
                action: light.turn_on
              - delay:
                  milliseconds: 100
              - data:
                  entity_id:
                    - light.driveway
                    - light.dimmable_light_1
                action: light.turn_off
              - delay:
                  milliseconds: "{{ range(50, 200) | random }}"
        - delay:
            seconds: 1
        - data:
            entity_id:
              - light.driveway
              - light.dimmable_light_1
            brightness: 30
          action: light.turn_on
        - delay:
            milliseconds: "{{ range(300, 600) | random }}"
        - data:
            entity_id:
              - light.driveway
              - light.dimmable_light_1
          action: light.turn_off
        - delay:
            milliseconds: "{{ range(200, 500) | random }}"
        - data:
            entity_id:
              - light.driveway
              - light.dimmable_light_1
            brightness: 50
          action: light.turn_on
        - delay:
            milliseconds: "{{ range(400, 700) | random }}"
        - data:
            entity_id:
              - light.driveway
              - light.dimmable_light_1
          action: light.turn_off
  - target:
      entity_id: scene.driveway_glowing_grins
    action: scene.turn_on
    data: {}
  - data:
      entity_id: light.dimmable_light_1
    action: light.turn_on
  - target:
      entity_id: input_boolean.halloween_show
    action: input_boolean.turn_off
    data: {}
mode: single

Thanks for this @Eddie-ZE! I was able to get this up and running just in time for trick or treating by throwing a Google Home Mini outside, downloading a MP3, and making a few changes. For the headings (triggers, conditions, actions) I needed to remove the s (trigger, condition, action). The syntax of the trigger wasn’t quite right either.
Here’s the start of mine (also added triggers for frigate detecting a person on my sidewalk or porch):

alias: Driveway Halloween
description: ""
trigger:
  - platform: state
    entity_id:
      - input_boolean.halloween_show
    to: "on"
  - platform: state
    entity_id:
      - binary_sensor.porch_person_occupancy
    to: "on"
  - platform: state
    entity_id:
      - binary_sensor.endsidewalk_person_occupancy
    to: "on"
condition: []
action:
...