blueprint: name: Ikea Styrbar Remote description: Control your lights with the IKEA STYRBAR remote. You can also set actions for the left and right button. domain: automation input: transition_time: name: Transition time description: Transition time for the target lights in seconds selector: number: min: 1.0 max: 60.0 mode: slider step: 0.1 unit_of_measurement: 'sec' remote: name: Remote description: The action entity of your Styrbar remote selector: entity: domain: sensor target_light: name: Lights description: The lights you want to control with the remote selector: target: entity: domain: light button_left: name: Left button description: Action to run on left button press default: [] selector: action: {} button_right: name: right button description: Action to run on right button press default: [] selector: action: {} brightness: name: Brightness description: The brightness you want your lights to be when turning them on default: 100 selector: number: min: 0.0 max: 100.0 mode: slider step: 1.0 unit_of_measurement: '%' force_brightness: name: Force Brightness description: Force the above set brightness when turning on the lamps? default: false selector: boolean: {} source_url: https://raw.githubusercontent.com/Computerfreak14/Z2M-Styrbar-remote-blueprint/main/Z2M-IKEA-STYRBAR-remote.yaml trigger: - platform: state entity_id: !input 'remote' attribute: action condition: [] action: - variables: command: '{{ trigger.to_state.state }}' - choose: - conditions: - condition: template value_template: '{{ command == ''on'' }}' sequence: - choose: - conditions: '{{ force_brightness }}' sequence: - service: light.turn_on target: !input 'target_light' data: transition: !input transition_time brightness_pct: !input 'brightness' color_name: white default: - service: light.turn_on target: !input 'target_light' data: transition: !input transition_time color_name: white - conditions: - condition: template value_template: '{{ command == ''off'' }}' sequence: - service: light.turn_off target: !input 'target_light' data: transition: !input transition_time - conditions: - condition: template value_template: '{{ command == ''brightness_move_down'' }}' sequence: - repeat: until: - condition: state entity_id: !input 'remote' state: brightness_stop attribute: action sequence: - service: light.turn_on data: brightness_step_pct: -10 transition: !input transition_time target: !input 'target_light' - delay: '1' - conditions: - condition: template value_template: '{{ command == ''brightness_move_up'' }}' sequence: - repeat: until: - condition: state entity_id: !input 'remote' state: brightness_stop attribute: action sequence: - service: light.turn_on data: brightness_step_pct: +10 transition: !input transition_time target: !input 'target_light' - delay: '1' - conditions: - '{{ command == ''arrow_left_click'' }}' sequence: !input 'button_left' - conditions: - '{{ command == ''arrow_right_click'' }}' sequence: !input 'button_right' mode: restart max_exceeded: silent