Help me make a halloween light show please

I set up my hue bulbs in fixtures outside for Halloween. I would really like them to cycle through a set of colors. I used this to get them rotating through random colors, but white, and green aren’t halloweenie.

`automation:
  alias: Random GLeft
  initial_state: False
  hide_entity: False
trigger:
  platform: time
  seconds: '/5'
action:
  service: homeassistant.turn_on
  entity_id:
    - light.gright
  data:
    effect: random
    transition: 1
    brightness: 255`

Any thoughts on how I could get this to cycle through a few selected colors like red, orange, purple and blue?

2 Likes

@navycow

You could create an automation the starts a nested script. In the script you can call the specific RGB code for the color you want add a delay and call the next color you want. http://www.developers.meethue.com/documentation/hue-xy-values

Do this for as many colors as you want and at the end call the script.turn_on and turn on this script. It will loop continuously.

Then create an automation to bring it out of the loop aka stop the script.

You will loose the randomness but with a robust script you can make it seem random.

- alias: d1
  id: disco1
  trigger:
  - platform: time_pattern
    seconds: '/1'
  action:
    - service: light.turn_on
      data_template:
        entity_id: light.cla60_rgbw_0a2d01_3
        hs_color:
          - "{{now().timestamp()%360}}"
          - "100.0"