it would be awesome that we can program the left and right button or add more light entities. i.e. switch scenes with the left and right buttons. Or do some other things.
Edit:
I changed something in your blueprint, so the right button will be a scene switcher.
herefor you need a input switch helper where you put in your scenes you ant to toggle. You can also add multiple lights to control with the styrbar. The right button is connected to the sceneswitcher hard coded. Using !input scene_switcher gave errors.
blueprint:
name: Styrbar Remote Control for Lights
description:
"Provides integration and control for the IKEA E2001/E2002 Styrbar
remote control. Allows for turning lights on/off, adjusting brightness, and changing
color temperature. Designed for a Zigbee2MQTT group of light bulbs.
"
domain: automation
input:
light_entity:
name: Light Entity
description: The light to control.
selector:
entity:
domain:
- light
multiple: true
scene_entity:
name: Scene Entity
description: The scene to control.
selector:
entity:
multiple: false
mqtt_device:
name: Styrbar Remote Control
description: The IKEA E2001/E2002 remote control.
selector:
device:
multiple: false
brightness_step:
name: Brightness Step
description: Brightness adjustment step (slider percentage, 1-100%).
default: 5
selector:
number:
min: 1.0
max: 100.0
step: 1.0
unit_of_measurement: "%"
mode: slider
delay_ms:
name: Delay (ms) Between Steps
description: Delay in milliseconds between brightness adjustment steps.
default: 300
selector:
number:
min: 100.0
max: 2000.0
step: 100.0
unit_of_measurement: ms
mode: slider
transition_seconds:
name: Transition Time (Seconds)
description: The duration in seconds for the light transition effect.
default: 1
selector:
number:
min: 0.1
max: 9999.0
step: 0.1
unit_of_measurement: s
mode: slider
source_url: https://github.com/ouhlar/home_assistant/blob/main/blueprints/styrbar_light_remote_control.yaml
trigger:
- platform: device
device_id: !input mqtt_device
domain: mqtt
type: action
subtype: "on"
id: light_on
- platform: device
device_id: !input mqtt_device
domain: mqtt
type: action
subtype: "off"
id: light_off
- platform: device
device_id: !input mqtt_device
domain: mqtt
type: action
subtype: arrow_left_click
id: change_color_left
- platform: device
device_id: !input mqtt_device
domain: mqtt
type: action
subtype: arrow_right_click
id: switch_scene
- platform: device
device_id: !input mqtt_device
domain: mqtt
type: action
subtype: brightness_move_down
id: dim_down
- platform: device
device_id: !input mqtt_device
domain: mqtt
type: action
subtype: brightness_move_up
id: dim_up
- platform: device
device_id: !input mqtt_device
domain: mqtt
type: action
subtype: brightness_stop
id: dim_stop
action:
- choose:
- conditions:
- condition: trigger
id: light_on
sequence:
- service: light.turn_on
target:
entity_id: !input light_entity
- conditions:
- condition: trigger
id: light_off
sequence:
- service: light.turn_off
target:
entity_id: !input light_entity
- conditions:
- condition: trigger
id: switch_scene
sequence:
- service: input_select.select_next
target:
entity_id: !input scene_entity
- service: scene.turn_on
target:
entity_id: "{{ states('input_select.sceneswitch') }}"
- conditions:
- condition: trigger
id: change_color_right
sequence:
- service: light.turn_on
target:
entity_id: !input light_entity
data:
kelvin: 2000
- conditions:
- condition: trigger
id: dim_down
sequence:
- repeat:
sequence:
- service: light.turn_on
target:
entity_id: !input light_entity
data:
brightness_step_pct: -{{ states('input.brightness_step') | int(5) }}
transition: !input transition_seconds
- delay:
milliseconds: !input delay_ms
until:
- condition: trigger
id: dim_stop
- conditions:
- condition: trigger
id: dim_up
sequence:
- repeat:
sequence:
- service: light.turn_on
target:
entity_id: !input light_entity
data:
brightness_step_pct: "{{ states('input.brightness_step') | int(5) }}"
transition: !input transition_seconds
- delay:
milliseconds: !input delay_ms
until:
- condition: trigger
id: dim_stop
mode: restart