I found an workaround to use an Ikea 5 button controller with my RGB led strip controlled by tasmota via mqtt
That I need to do was use next and prev button to change color on my RGB led
I use this:
first of all create a input number
input_number:
rgb_color:
name: RGB Color
icon: mdi:palette
min: 0
max: 360
step: 20
next, you can use the number value to set your rgb color with this automation
- id: 'rgbw_prev'
alias: rgbw_prev
initial_state: 'on'
trigger:
- platform: event
event_type: deconz_event
event_data:
id: ctrl5buttons1
event: 4002
action:
- service: input_number.set_value
data_template:
entity_id: input_number.rgb_color
value: '{{ states.input_number.rgb_color.state | int - 20 }}'
- service: mqtt.publish
data_template:
topic: 'cmnd/rgbw_cam/HsbColor2'
payload: 100
- service: mqtt.publish
data_template:
topic: 'cmnd/rgbw_cam/HsbColor1'
payload: "{{ states('input_number.rgb_color') }}"
and
- id: 'rgbw_next'
alias: rgbw_next
initial_state: 'on'
trigger:
- platform: event
event_type: deconz_event
event_data:
id: ctrl5buttons1
event: 5002
action:
- service: input_number.set_value
data_template:
entity_id: input_number.rgb_color
value: '{{ states.input_number.rgb_color.state | int + 20 }}'
- service: mqtt.publish
data_template:
topic: 'cmnd/rgbw_cam/HsbColor2'
payload: 100
- service: mqtt.publish
data_template:
topic: 'cmnd/rgbw_cam/HsbColor1'
payload: "{{ states('input_number.rgb_color') }}"
at this point you can change color by press next and prev buttons
but you have a problem! when you reach 360 or 0 value you can only go in one way!
workaround
with this automation when you reach 0 value on your slider at next button’s click set to 340 (0 and 360 is the same color on HSB)
- id: 'back_to_360'
alias: back_to_360
initial_state: 'on'
trigger:
- platform: event
event_type: deconz_event
event_data:
id: ctrl5buttons1
event: 4002
condition:
- condition: state
entity_id: input_number.rgb_color
state: "0.0"
action:
- service: input_number.set_value
data_template:
entity_id: input_number.rgb_color
value: "340"
and when is 360 go to 20
- id: 'back_to_0'
alias: back_to_0
initial_state: 'on'
trigger:
- platform: event
event_type: deconz_event
event_data:
id: ctrl5buttons1
event: 5002
condition:
- condition: state
entity_id: input_number.rgb_color
state: "360.0"
action:
- service: input_number.set_value
data_template:
entity_id: input_number.rgb_color
value: "20"