Instantly share code, notes, and snippets.
Created
March 9, 2026 22:02
-
Star
0
(0)
You must be signed in to star a gist -
Fork
0
(0)
You must be signed in to fork a gist
-
-
Save robojerk/f4ada09eb077d971d0b44254915d54c0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # IKEA BILRESA Dual Button (Matter) — two buttons, no scroll wheel. | |
| # Lights only (no music). Short press, double press, long press per button. | |
| blueprint: | |
| name: "IKEA BILRESA Dual Button - Light Controller (Matter)" | |
| description: > | |
| Light control for IKEA BILRESA dual-button remote (Matter). Two buttons; each supports short press, double press, and long press. Lights only. | |
| domain: automation | |
| input: | |
| button_1_event: | |
| name: "Button 1 (single dot) – event entity" | |
| description: "Event entity for the button with one dot. Settings → Devices → [your Bilresa] → Entities (event.*)." | |
| selector: | |
| entity: | |
| filter: | |
| - domain: event | |
| button_2_event: | |
| name: "Button 2 (double dot) – event entity" | |
| description: "Event entity for the button with two dots." | |
| selector: | |
| entity: | |
| filter: | |
| - domain: event | |
| light_1: | |
| name: "Light(s) for Button 1" | |
| description: "Light or group to control with Button 1." | |
| default: {} | |
| selector: { target: { entity: { domain: light } } } | |
| light_2: | |
| name: "Light(s) for Button 2" | |
| description: "Light or group to control with Button 2." | |
| default: {} | |
| selector: { target: { entity: { domain: light } } } | |
| action_1_short: | |
| name: "Button 1 – short press" | |
| description: "Action when Button 1 is pressed once (e.g. toggle light)." | |
| default: [] | |
| selector: { action: {} } | |
| action_1_double: | |
| name: "Button 1 – double press" | |
| description: "Optional action when Button 1 is pressed twice." | |
| default: [] | |
| selector: { action: {} } | |
| action_1_long: | |
| name: "Button 1 – long press" | |
| description: "Optional action when Button 1 is held." | |
| default: [] | |
| selector: { action: {} } | |
| action_1_long_release: | |
| name: "Button 1 – release after long press" | |
| description: "Optional action when Button 1 is released after a long press." | |
| default: [] | |
| selector: { action: {} } | |
| action_2_short: | |
| name: "Button 2 – short press" | |
| description: "Action when Button 2 is pressed once." | |
| default: [] | |
| selector: { action: {} } | |
| action_2_double: | |
| name: "Button 2 – double press" | |
| description: "Optional action when Button 2 is pressed twice." | |
| default: [] | |
| selector: { action: {} } | |
| action_2_long: | |
| name: "Button 2 – long press" | |
| description: "Optional action when Button 2 is held." | |
| default: [] | |
| selector: { action: {} } | |
| action_2_long_release: | |
| name: "Button 2 – release after long press" | |
| description: "Optional action when Button 2 is released after a long press." | |
| default: [] | |
| selector: { action: {} } | |
| mode: single | |
| max_exceeded: silent | |
| trigger: | |
| - trigger: state | |
| entity_id: | |
| - !input button_1_event | |
| - !input button_2_event | |
| condition: | |
| - condition: template | |
| value_template: "{{ trigger.from_state.state is not none and trigger.to_state.state is not none }}" | |
| - condition: template | |
| value_template: "{{ trigger.from_state.state not in ['unknown', 'unavailable'] and trigger.to_state.state not in ['unknown', 'unavailable'] }}" | |
| - condition: template | |
| value_template: "{{ trigger.from_state.state != trigger.to_state.state }}" | |
| variables: | |
| button_1_entity: !input button_1_event | |
| button_2_entity: !input button_2_event | |
| press_type: "{{ trigger.to_state.attributes.event_type | default('') }}" | |
| action: | |
| - choose: | |
| # Button 1 | |
| - conditions: | |
| - condition: template | |
| value_template: "{{ trigger.entity_id == button_1_entity }}" | |
| sequence: | |
| - choose: | |
| - conditions: "{{ press_type == 'multi_press_1' }}" | |
| sequence: !input action_1_short | |
| - conditions: "{{ press_type == 'multi_press_2' }}" | |
| sequence: !input action_1_double | |
| - conditions: "{{ press_type == 'long_press' }}" | |
| sequence: !input action_1_long | |
| - conditions: "{{ press_type == 'long_release' }}" | |
| sequence: !input action_1_long_release | |
| # Button 2 | |
| - conditions: | |
| - condition: template | |
| value_template: "{{ trigger.entity_id == button_2_entity }}" | |
| sequence: | |
| - choose: | |
| - conditions: "{{ press_type == 'multi_press_1' }}" | |
| sequence: !input action_2_short | |
| - conditions: "{{ press_type == 'multi_press_2' }}" | |
| sequence: !input action_2_double | |
| - conditions: "{{ press_type == 'long_press' }}" | |
| sequence: !input action_2_long | |
| - conditions: "{{ press_type == 'long_release' }}" | |
| sequence: !input action_2_long_release |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment