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: remote: name: Remote description: The action entity of your Styrbar remote selector: entity: domain: sensor target_light_short: name: Lights (short press sun) description: The lights you want to control with the remote short press sun selector: target: entity: domain: light target_light_long: name: Lights (long press sun) description: The lights you want to control with the remote long press sun 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: {} source_url: https://raw.githubusercontent.com/bvdberg01/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: - service: light.turn_on target: !input 'target_light_short' - conditions: - condition: template value_template: '{{ command == ''brightness_move_up'' }}' sequence: - service: light.turn_on target: !input 'target_light_long' - conditions: - condition: template value_template: '{{ command == ''off'' }}' sequence: - service: light.turn_off target: !input 'target_light_short' - conditions: - condition: template value_template: '{{ command == ''brightness_move_down'' }}' sequence: - service: light.turn_off target: !input 'target_light_long' - conditions: - '{{ command == ''arrow_left_click'' }}' sequence: !input 'button_left' - conditions: - '{{ command == ''arrow_right_click'' }}' sequence: !input 'button_right' mode: restart max_exceeded: silent