ZHA - IKEA 4-button Styrbar Full 10-Actions (White/Silver remotes)
This blueprint provides comprehensive mapping for all 10 possible interactions for the IKEA Styrbar remote series via ZHA (Zigbee Home Automation). It is compatible with both the Silver (E2001) and White (E2313) variants.
This blueprint specifically addresses the hardware quirk where Left/Right Hold triggers an “On” event. By using mode: restart, the Long Press action takes priority and cancels the initial Short Press sequence, allowing you to assign different commands to Hold actions without interference.
Compatibility
- Model E2001: The original brushed-silver 4-button remote.
- Model E2313: The standard white 4-button remote.
- Integration: Specifically designed for use with ZHA.
Functionality Breakdown
- Vertical Axis (Top/Bottom): Short presses act as standard toggles (On/Off). Long presses trigger a “Move” command for smooth dimming and fire a “Stop” command when released.
- Horizontal Axis (Left/Right): Provides distinct “Press” (short) and “Hold” (long) events.
Best Use Cases
- 4 Buttons, 4 Lights: Control power using short and long presses.
- Scene Control: Use short presses for toggles and long presses to set specific scenes.
Blueprint Code
blueprint:
name: ZHA - IKEA 4 button Styrbar Full 10-Action (White/Silver)
description: >
IKEA Styrbar 4-Button Remote Integration (ZHA)(https://www.home-assistant.io/integrations/zha/).
This blueprint provides comprehensive mapping for all 10 possible interactions for the IKEA Styrbar remote series. It is compatible with both the Silver (E2001) and White (E2313) variants.
This blueprint addresses the issue of Left/Right Hold triggering On events. This means you should be able to apply different to commands to Left/Right Hold actions without issue.
This is useful for example to control a light/switch using quick fire (On actions) and Hold (Off actions) on a single button.
Compatibility:
* Model E2001: The original brushed-silver 4-button remote.
* Model E2313: The standard white 4-button remote.
* Integration: Specifically designed for use with ZHA (Zigbee Home Automation).
Functionality Breakdown:
* Vertical Axis (Top/Bottom): These buttons use Clusters 6 and 8. Short presses act as standard toggles (On/Off). Long presses trigger a "Move" command, ideal for smooth dimming, and fire a "Stop" command when released.
* Horizontal Axis (Left/Right): These buttons use Cluster 5. They provide distinct "Press" (short) and "Hold" (long) events.
* The "Pre-fire" Quirk: Note that the Styrbar hardware sends a "Short Press" signal the instant a button is pushed, followed by a "Hold" signal if it isn't released. This blueprint uses mode: restart to ensure the Long Press action takes priority and cancels the initial Short Press sequence.
Best Use Cases:
* 4 Buttons, 4 Lights (On/Off using short and long press).
* 4 Buttons, 4 lights (On/Off toggle with short press, Set scenes with Long press).
domain: automation
input:
remote:
name: Remote
description: Select your White (E2313) or Silver (E2001) 4 Button Styrbar remote.
selector:
device:
integration: zha
manufacturer: IKEA of Sweden
model: Remote Control N2
# --- CLICK ACTIONS ---
button_up_short:
name: '"Turn on" pressed (Top)'
description: 'Quick tap of the top button.'
default: []
selector: { action: null }
button_down_short:
name: '"Turn off" pressed (Bottom)'
description: 'Quick tap of the bottom button.'
default: []
selector: { action: null }
button_left_short:
name: '"Left" pressed'
description: 'Quick tap of the left button.'
default: []
selector: { action: null }
button_right_short:
name: '"Right" pressed'
description: 'Quick tap of the right button.'
default: []
selector: { action: null }
# --- LONG PRESS ACTIONS ---
button_up_long:
name: '"Dim up" continuously pressed (Top)'
description: 'Continuous hold of the top button.'
default: []
selector: { action: null }
button_down_long:
name: '"Dim down" continuously pressed (Bottom)'
description: 'Continuous hold of the bottom button.'
default: []
selector: { action: null }
button_left_long:
name: '"Left" continuously pressed'
description: 'Long press of the left button.'
default: []
selector: { action: null }
button_right_long:
name: '"Right" continuously pressed'
description: 'Long press of the right button.'
default: []
selector: { action: null }
# --- RELEASE ACTIONS ---
button_up_release:
name: '"Dim up" released (Top)'
description: 'Let go after a long press on the top button.'
default: []
selector: { action: null }
button_down_release:
name: '"Dim down" released (Bottom)'
description: 'Let go after a long press on the bottom button.'
default: []
selector: { action: null }
mode: restart
max_exceeded: silent
trigger:
- platform: event
event_type: zha_event
event_data:
device_id: !input "remote"
action:
- variables:
command: "{{ trigger.event.data.command }}"
args: "{{ trigger.event.data.args }}"
- choose:
- conditions: "{{ command == 'on' }}"
sequence: !input "button_up_short"
- conditions: "{{ command == 'move_with_on_off' }}"
sequence: !input "button_up_long"
- conditions: "{{ command == 'stop_with_on_off' }}"
sequence: !input "button_up_release"
- conditions: "{{ command == 'off' }}"
sequence: !input "button_down_short"
- conditions: "{{ command == 'move' }}"
sequence: !input "button_down_long"
- conditions: "{{ command == 'stop' }}"
sequence: !input "button_down_release"
- conditions:
- "{{ command == 'press' }}"
- "{{ args == [257, 13, 0] }}"
sequence: !input "button_left_short"
- conditions:
- "{{ command == 'hold' }}"
- "{{ args == [3329, 0] }}"
sequence: !input "button_left_long"
- conditions:
- "{{ command == 'press' }}"
- "{{ args == [256, 13, 0] }}"
sequence: !input "button_right_short"
- conditions:
- "{{ command == 'hold' }}"
- "{{ args == [3328, 0] }}"
sequence: !input "button_right_long"
