Cyceling through colour presets or change colour for bulb with button ''ZHA - IKEA 4 button remote for lights' blueprint

I am suing the IKEA 4 way button and the ‘ZHA - IKEA 4 button remote for lights’ blueprint. I want to use the left and right buttons to chasnge the colour of the bulb. Preferebly going theough the presets I defined for the colours (one ones I get when I click on the bulb and can change brightness or colour, and define presets). Alternativly puting a list of colours/rgb values to cycle through.

It seems using a service is the way to go but can figre out whitch one. Looked up service online but I can not find a full service reference.

Here is what I have. I have put in

alias: Lounge Bulb 4 Way Switch
description: ""
use_blueprint:
  path: Malte/zha-ikea-four-button-remote-styrbar-for-lights-e2001-e2002.yaml
  input:
    light:
      entity_id: light.lounge_rgb_bulb_cealing
    remote: 90222705008cc115af85d0c422a6ec4f
    brightness: 25
    button_left_short:
      - service: ????
        data: {}
    button_right_short:
      - service: ???
        data: {}

Any help mutch apreciated.

Regards,
Ben

Light turn on is the service that changes the light settings. And yes, you can use it even if the light is already on.

Thanks for replying but was asking whitch service does this.

As I stated and you might not have read clearly in the docs, the light.turn_on service.

OK, thanks. The light_on service. Can use that to set a colour on a button but is there a way to cycel through a set of presets? Will have a play to see if I can do it with conditions.

i got the same problem i can call light on and a color scene, but not cycling pressing the button. did you work it out?

Did you work it out?

You could try my custom template…
Color Multi Tool below…

Install the custom macro, then just call this script whenever you want the color to change. And you can pick HS, XY, RGB, or named colors to pull at random.

random_color:
  alias: Random Color
  fields:
    light:
      name: Light entity to control
      description: Add the light entity you want to control here
      required: true
      example: light.grp_kitch
      default: light.grp_kitch
      selector:
        entity:
          domain: light
  variables:
    light: light.grp_kitch
  sequence:
  - service: light.turn_on
    entity_id: light.grp_kitch
    data:
      hs_color: >-
        {% from 'color_multi_tool.jinja' import random_hs %}
        {% set _rhs = random_hs().split(",") | list -%}
        [{{ _rhs[0]|float(0)|round(2) }}, {{ _rhs[1]|float(0)|round(2) }}]
  mode: single
  icon: mdi:traffic-light-outline

To call it:

      sequence:
      - service: script.random_color
        data:
          light: light.grp_kitch
1 Like

Been a while, sorry. It was more cycle red, green, blue, magenta and cyan type thing.