Hue removed their color loop function so I’m attempting to make my own. I thought this would be fairly simple, but it doesn’t work. One of the reasons is that telling my Hue bulb to go to a specific color such as hs_color [60,100] gets it close but not exactly there. For example it’s currently 60.625, 75.294 (okay so the sat is WAY off).
Simply, my stripped down automation should trigger if the light turns on, and then keep triggering itself at the end of every transition. If turns on, set to red [0,100]. If multiple of 60 color, add 60 color over a transition. Unfortunately, the decimal issue is a problem as none of my extra triggers will ever work if they aren’t exactly multiples of 60 or 0, but also it doesn’t even trigger the first if 0,100 either and I don’t know why.
alias: Color Loop
description: ""
trigger:
- platform: state
entity_id:
- light.abbott
to: "on"
id: start
- platform: state
entity_id:
- light.abbott
attribute: hs_color
to: "[0,100]"
- platform: state
entity_id:
- light.abbott
attribute: hs_color
to: "[60,100]"
- platform: state
entity_id:
- light.abbott
attribute: hs_color
to: "[120,100]"
- platform: state
entity_id:
- light.abbott
attribute: hs_color
to: "[180,100]"
- platform: state
entity_id:
- light.abbott
attribute: hs_color
to: "[240,100]"
- platform: state
entity_id:
- light.abbott
attribute: hs_color
to: "[300,100]"
condition: []
action:
- if:
- condition: trigger
id: start
then:
- service: light.turn_on
data:
hs_color:
- 0
- 100
target:
entity_id: light.abbott
else:
- service: light.turn_on
target:
entity_id: light.abbott
data:
transition: 1
hs_color:
- "{{ [ 360, state_attr('light.abbott', 'hs_color')[0] + 60] | min }}"
- "{{ state_attr('light.abbott', 'hs_color')[1] }}"
mode: single