Created
September 27, 2025 19:51
-
-
Save andrioid/1e9b56e3ff63a8a4f7d08781ebe0655e to your computer and use it in GitHub Desktop.
ikea styrbar z2m
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: IKEA Styrbar - E2001_E2002 Switch Actions (Z2M) | |
| description: | |
| Define actions for press and hold on all four buttons of the E2001_E2002 | |
| switch. | |
| domain: automation | |
| author: Keviin Cosmos | |
| input: | |
| controller_device: | |
| name: (Zigbee2MQTT) Controller Device | |
| description: The action device of the controller to use for the automation. | |
| default: "" | |
| selector: | |
| device: | |
| multiple: false | |
| hold_delay: | |
| name: Hold delay | |
| description: | |
| If the button has been held more than the configured Hold delay, | |
| the corresponding held action is triggered. | |
| default: 1000 | |
| selector: | |
| number: | |
| min: 100.0 | |
| max: 5000.0 | |
| unit_of_measurement: milliseconds | |
| mode: box | |
| step: 10.0 | |
| light_large_push: | |
| name: Light Large (Top) Pushed | |
| default: [] | |
| selector: | |
| action: {} | |
| light_large_hold: | |
| name: Light Large (Top) Held | |
| default: [] | |
| selector: | |
| action: {} | |
| light_small_push: | |
| name: Light Small (Bottom) Pushed | |
| default: [] | |
| selector: | |
| action: {} | |
| light_small_hold: | |
| name: Light Small (Bottom) Held | |
| default: [] | |
| selector: | |
| action: {} | |
| arrow_left_push: | |
| name: Arrow Left Pushed | |
| default: [] | |
| selector: | |
| action: {} | |
| arrow_left_hold: | |
| name: Arrow Left Held | |
| default: [] | |
| selector: | |
| action: {} | |
| arrow_right_push: | |
| name: Arrow Right Pushed | |
| default: [] | |
| selector: | |
| action: {} | |
| arrow_right_hold: | |
| name: Arrow Right Held | |
| default: [] | |
| selector: | |
| action: {} | |
| source_url: https://community.home-assistant.io/t/ikea-styrbar-e2001-2002-ultimate-zigbee2mqtt-z2m/625090 | |
| mode: single | |
| max_exceeded: silent | |
| triggers: | |
| - trigger: device | |
| domain: mqtt | |
| device_id: !input controller_device | |
| type: action | |
| id: "on" | |
| subtype: "on" | |
| - trigger: device | |
| domain: mqtt | |
| device_id: !input controller_device | |
| type: action | |
| id: "brightness_move_up" | |
| subtype: "brightness_move_up" | |
| - trigger: device | |
| domain: mqtt | |
| device_id: !input controller_device | |
| type: action | |
| id: "off" | |
| subtype: "off" | |
| - trigger: device | |
| domain: mqtt | |
| device_id: !input controller_device | |
| type: action | |
| id: "brightness_move_down" | |
| subtype: "brightness_move_down" | |
| - trigger: device | |
| domain: mqtt | |
| device_id: !input controller_device | |
| type: action | |
| id: "arrow_left_click" | |
| subtype: "arrow_left_click" | |
| - trigger: device | |
| domain: mqtt | |
| device_id: !input controller_device | |
| type: action | |
| id: "arrow_right_click" | |
| subtype: "arrow_right_click" | |
| - trigger: device | |
| domain: mqtt | |
| device_id: !input controller_device | |
| type: action | |
| id: "arrow_left_hold" | |
| subtype: "arrow_left_hold" | |
| - trigger: device | |
| domain: mqtt | |
| device_id: !input controller_device | |
| type: action | |
| id: "arrow_right_hold" | |
| subtype: "arrow_right_hold" | |
| action: | |
| - variables: | |
| trigger_action: "{{ trigger.id }}" | |
| - choose: | |
| - conditions: | |
| - condition: template | |
| value_template: '{{ trigger_action == "on" }}' | |
| sequence: !input light_large_push | |
| - conditions: | |
| - condition: template | |
| value_template: '{{ trigger_action == "brightness_move_up" }}' | |
| sequence: !input light_large_hold | |
| - conditions: | |
| - condition: template | |
| value_template: '{{ trigger_action == "off" }}' | |
| sequence: !input light_small_push | |
| - conditions: | |
| - condition: template | |
| value_template: '{{ trigger_action == "brightness_move_down" }}' | |
| sequence: !input light_small_hold | |
| - conditions: | |
| - condition: template | |
| value_template: '{{ trigger_action == "arrow_left_click" }}' | |
| sequence: !input arrow_left_push | |
| - conditions: | |
| - condition: template | |
| value_template: '{{ trigger_action == "arrow_left_hold" }}' | |
| sequence: !input arrow_left_hold | |
| - conditions: | |
| - condition: template | |
| value_template: '{{ trigger_action == "arrow_right_click" }}' | |
| sequence: !input arrow_right_push | |
| - conditions: | |
| - condition: template | |
| value_template: '{{ trigger_action == "arrow_right_hold" }}' | |
| sequence: !input arrow_right_hold |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment