Instantly share code, notes, and snippets.
Last active
January 27, 2026 15:08
-
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 l-margiela/edecb1fb7dd7eb6f22e8253a0d19b2b5 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
| blueprint: | |
| name: Shelly BLU RC Button 4 ZB | |
| description: | | |
| Control actions for each button on the Shelly BLU RC Button 4 ZB. | |
| Supports single, double, triple press and long press (hold) for all 4 buttons. | |
| Note: Quadruple press enters Bluetooth pairing, quintuple press enters Zigbee pairing. | |
| domain: automation | |
| input: | |
| device: | |
| name: Shelly BLU RC Button 4 ZB Device | |
| description: Select your Shelly BLU RC Button 4 ZB device | |
| selector: | |
| device: | |
| integration: zha | |
| button_1_section: | |
| name: "๐ Button 1 (Top)" | |
| icon: mdi:numeric-1-circle | |
| collapsed: true | |
| input: | |
| button_1_single: | |
| name: Single Press | |
| default: [] | |
| selector: | |
| action: | |
| button_1_double: | |
| name: Double Press | |
| default: [] | |
| selector: | |
| action: | |
| button_1_triple: | |
| name: Triple Press | |
| default: [] | |
| selector: | |
| action: | |
| button_1_long: | |
| name: Long Press (Hold) | |
| description: Fires repeatedly while held | |
| default: [] | |
| selector: | |
| action: | |
| button_2_section: | |
| name: "๐ Button 2" | |
| icon: mdi:numeric-2-circle | |
| collapsed: true | |
| input: | |
| button_2_single: | |
| name: Single Press | |
| default: [] | |
| selector: | |
| action: | |
| button_2_double: | |
| name: Double Press | |
| default: [] | |
| selector: | |
| action: | |
| button_2_triple: | |
| name: Triple Press | |
| default: [] | |
| selector: | |
| action: | |
| button_2_long: | |
| name: Long Press (Hold) | |
| description: Fires repeatedly while held | |
| default: [] | |
| selector: | |
| action: | |
| button_3_section: | |
| name: "๐ Button 3" | |
| icon: mdi:numeric-3-circle | |
| collapsed: true | |
| input: | |
| button_3_single: | |
| name: Single Press | |
| default: [] | |
| selector: | |
| action: | |
| button_3_double: | |
| name: Double Press | |
| default: [] | |
| selector: | |
| action: | |
| button_3_triple: | |
| name: Triple Press | |
| default: [] | |
| selector: | |
| action: | |
| button_3_long: | |
| name: Long Press (Hold) | |
| description: Fires repeatedly while held | |
| default: [] | |
| selector: | |
| action: | |
| button_4_section: | |
| name: "๐ Button 4 (Bottom)" | |
| icon: mdi:numeric-4-circle | |
| collapsed: true | |
| input: | |
| button_4_single: | |
| name: Single Press | |
| default: [] | |
| selector: | |
| action: | |
| button_4_double: | |
| name: Double Press | |
| default: [] | |
| selector: | |
| action: | |
| button_4_triple: | |
| name: Triple Press | |
| default: [] | |
| selector: | |
| action: | |
| button_4_long: | |
| name: Long Press (Hold) | |
| description: Fires repeatedly while held | |
| default: [] | |
| selector: | |
| action: | |
| mode: parallel | |
| max_exceeded: silent | |
| trigger: | |
| - platform: event | |
| event_type: zha_event | |
| event_data: | |
| device_id: !input device | |
| action: | |
| - variables: | |
| command: "{{ trigger.event.data.command }}" | |
| endpoint_id: "{{ trigger.event.data.endpoint_id }}" | |
| cluster_id: "{{ trigger.event.data.cluster_id }}" | |
| scene_id: "{{ trigger.event.data.params.scene_id | default(0) }}" | |
| step_mode: "{{ trigger.event.data.params.step_mode | default(-1) }}" | |
| - choose: | |
| # Button 1 - Single (endpoint 1, cluster 6, on) | |
| - conditions: | |
| - "{{ endpoint_id == 1 and cluster_id == 6 and command == 'on' }}" | |
| sequence: !input button_1_single | |
| # Button 2 - Single (endpoint 1, cluster 6, off) | |
| - conditions: | |
| - "{{ endpoint_id == 1 and cluster_id == 6 and command == 'off' }}" | |
| sequence: !input button_2_single | |
| # Button 3 - Single (endpoint 2, cluster 6, on) | |
| - conditions: | |
| - "{{ endpoint_id == 2 and cluster_id == 6 and command == 'on' }}" | |
| sequence: !input button_3_single | |
| # Button 4 - Single (endpoint 2, cluster 6, off) | |
| - conditions: | |
| - "{{ endpoint_id == 2 and cluster_id == 6 and command == 'off' }}" | |
| sequence: !input button_4_single | |
| # Button 1 - Double (endpoint 1, cluster 5, recall, scene 1) | |
| - conditions: | |
| - "{{ endpoint_id == 1 and cluster_id == 5 and command == 'recall' and scene_id == 1 }}" | |
| sequence: !input button_1_double | |
| # Button 2 - Double (endpoint 2, cluster 5, recall, scene 1) | |
| - conditions: | |
| - "{{ endpoint_id == 2 and cluster_id == 5 and command == 'recall' and scene_id == 1 }}" | |
| sequence: !input button_2_double | |
| # Button 3 - Double (endpoint 3, cluster 5, recall, scene 1) | |
| - conditions: | |
| - "{{ endpoint_id == 3 and cluster_id == 5 and command == 'recall' and scene_id == 1 }}" | |
| sequence: !input button_3_double | |
| # Button 4 - Double (endpoint 4, cluster 5, recall, scene 1) | |
| - conditions: | |
| - "{{ endpoint_id == 4 and cluster_id == 5 and command == 'recall' and scene_id == 1 }}" | |
| sequence: !input button_4_double | |
| # Button 1 - Triple (endpoint 1, cluster 5, recall, scene 2) | |
| - conditions: | |
| - "{{ endpoint_id == 1 and cluster_id == 5 and command == 'recall' and scene_id == 2 }}" | |
| sequence: !input button_1_triple | |
| # Button 2 - Triple (endpoint 2, cluster 5, recall, scene 2) | |
| - conditions: | |
| - "{{ endpoint_id == 2 and cluster_id == 5 and command == 'recall' and scene_id == 2 }}" | |
| sequence: !input button_2_triple | |
| # Button 3 - Triple (endpoint 3, cluster 5, recall, scene 2) | |
| - conditions: | |
| - "{{ endpoint_id == 3 and cluster_id == 5 and command == 'recall' and scene_id == 2 }}" | |
| sequence: !input button_3_triple | |
| # Button 4 - Triple (endpoint 4, cluster 5, recall, scene 2) | |
| - conditions: | |
| - "{{ endpoint_id == 4 and cluster_id == 5 and command == 'recall' and scene_id == 2 }}" | |
| sequence: !input button_4_triple | |
| # Button 1 - Long (endpoint 1, cluster 8, step, mode 0) | |
| - conditions: | |
| - "{{ endpoint_id == 1 and cluster_id == 8 and command == 'step' and step_mode == 0 }}" | |
| sequence: !input button_1_long | |
| # Button 2 - Long (endpoint 1, cluster 8, step, mode 1) | |
| - conditions: | |
| - "{{ endpoint_id == 1 and cluster_id == 8 and command == 'step' and step_mode == 1 }}" | |
| sequence: !input button_2_long | |
| # Button 3 - Long (endpoint 2, cluster 8, step, mode 0) | |
| - conditions: | |
| - "{{ endpoint_id == 2 and cluster_id == 8 and command == 'step' and step_mode == 0 }}" | |
| sequence: !input button_3_long | |
| # Button 4 - Long (endpoint 2, cluster 8, step, mode 1) | |
| - conditions: | |
| - "{{ endpoint_id == 2 and cluster_id == 8 and command == 'step' and step_mode == 1 }}" | |
| sequence: !input button_4_long |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment