Skip to content

Instantly share code, notes, and snippets.

@jasonmadigan
Last active December 22, 2025 18:26
Show Gist options
  • Select an option

  • Save jasonmadigan/50ac5195e9d4489b4b778ff05e584896 to your computer and use it in GitHub Desktop.

Select an option

Save jasonmadigan/50ac5195e9d4489b4b778ff05e584896 to your computer and use it in GitHub Desktop.
Recreate Winter Wonderland Light Effect with Home Assistant, without Philips Hue
alias: Winter Wonderland Light Effect
triggers:
- trigger: time_pattern
seconds: /4
id: cycle
- trigger: state
entity_id: input_boolean.winter_wonderland
to: "on"
id: toggle_on
- trigger: state
entity_id: input_boolean.winter_wonderland
to: "off"
id: toggle_off
actions:
- choose:
- conditions:
- condition: or
conditions:
- condition: trigger
id: toggle_on
- condition: and
conditions:
- condition: trigger
id: cycle
- condition: state
entity_id: input_boolean.winter_wonderland
state: "on"
sequence:
- repeat:
count: 21
sequence:
- action: light.turn_on
target:
entity_id: >
{% set lights = [
'light.house_downlight_1_light', 'light.house_downlight_2_light',
'light.house_downlight_3_light', 'light.house_downlight_4_light',
'light.house_downlight_5_light', 'light.house_downlight_6_light',
'light.house_downlight_7_light', 'light.house_downlight_8_light',
'light.house_downlight_9_light', 'light.house_downlight_10_light',
'light.house_downlight_11_light',
'light.sun_room_downlight_1_light', 'light.sun_room_downlight_2_light',
'light.sun_room_downlight_3_light', 'light.sun_room_downlight_4_light',
'light.sun_room_downlight_5_light', 'light.sun_room_downlight_6_light',
'light.sun_room_downlight_7_light', 'light.sun_room_downlight_8_light',
'light.sun_room_downlight_9_light', 'light.sun_room_downlight_10_light'
] %} {# We use repeat.index (1-based) minus 1 to get
0-based index #} {{ lights[repeat.index - 1] }}
data:
transition: 3
brightness: >
{% set step = (now().timestamp() / 4) | int %} {# Use
(repeat.index - 1) to match the light position #} {% set
idx = (repeat.index - 1) | int %} {{ 255 if (idx + step) %
2 == 0 else 60 }}
rgb_color: >
{% set step = (now().timestamp() / 4) | int %} {% set idx
= (repeat.index - 1) | int %}
{# Re-define palette here so it can never be lost #} {%
set palette = [
[255, 204, 170], [255, 182, 193], [255, 192, 203],
[221, 160, 221], [230, 230, 250], [176, 224, 230],
[173, 216, 230], [135, 206, 250], [0, 191, 255],
[240, 248, 255], [224, 255, 255], [200, 240, 230]
] %}
{% set col_idx = (idx + (step // 3)) % 12 %} {{
palette[col_idx] }}
- conditions:
- condition: trigger
id: toggle_off
sequence:
- action: light.turn_off
target:
entity_id: light.house_downlights
data:
transition: 1
mode: restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment