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.
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.
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