Hue Partymode templates not working

Continuing the discussion from CustomUI - discussion thread:

HI, as topic.

What could be wrong here, other than the hassio 0.68.1 not compatibel with Hue…:

automation:
  - id: hue_party_mode_on
    alias: "Turn Party Mode On"
    initial_state: 'off'
    trigger:
      - platform: time
        seconds: '/3'
    condition:
      - condition: state
        entity_id: input_boolean.party_mode
        state: 'on'
    action:
      - service: light.turn_on
        entity_id: light.buffet
        data_template:
          rgb_color: ['{{ (range(0, 255)|random) }}', '{{ (range(0, 255)|random) }}', '{{ (range(0, 255)|random) }}']
          brightness: 200
          transition: '{{ (range(1, 2)|random) }}'
      - service: light.turn_on
        entity_id: light.kist
        data_template:
          rgb_color: ['{{ (range(0, 255)|random) }}', '{{ (range(0, 255)|random) }}', '{{ (range(0, 255)|random) }}']
          brightness: 200
          transition: '{{ (range(1, 2)|random) }}'
      - service: light.turn_on
        entity_id: light.home_theater
        data_template:
          rgb_color: ['{{ (range(0, 255)|random) }}', '{{ (range(0, 255)|random) }}', '{{ (range(0, 255)|random) }}']
          brightness: 200
          transition: '{{ (range(1, 2)|random) }}'

I am not using HassIO. Is it not working at all? Any errors in the log?

I think I know what may be happening here. That automation was written for Lifx lights to simulate the random effect in Hue. I think Hue uses different color format. See this post for an example.

o thats impressive, thanks! Ill ask @pbavinck for some extra support on this, and please have a look how to adapt your automation toward, without the extra input numbers. Tried several versions in the dev-tools, but havent found the correct syntax yet :wink:

Which input sliders?

slip of the pen, input_numbers , sorry

Again…I am not seeing any input numbers either :wink:

on the link you provided to @pbavinck 's automation Hue Random Color autiomation help - #10 by pbavinck

Oh you mean on the other post.

You can replace You can replace them with a (range(0, 100)|random) if you don’t want to manually set the value

sure, but thats what i have in the automation I posted isn’t it? Somehow that doesn’t do its job.

think i have found it… so silly.
initial_state: ‘off’…

any reason you had that in your configuration? Since you turn on the party mode with the input_boolean, the main automation can be on?

btw, can we work in the ‘flash’ in this party_mode?
I must have gone blind, but where’s the mdi:party… the icon that shows up when a new Hassio version is ready.

input_boolean.party_mode:
  templates:
    icon: >
      if (state === 'on') return 'mdi:cake-layered';
      return 'mdi:hotel';
    icon_color: >
      if (state === 'on') return 'rgb(251, 210, 41)';
      return 'rgb(54, 95, 140)';

btw, would be really cool if we could have the input_boolean icon_color follow the randomization. Can that be done?

I disabled that automation temporarily…as it was getting randomly triggered.