Deprecated. Use the blueprints from Awesome Home Assistant instead.
Check out @niro1987 's awesome blueprint for the Tradfri 5 Button remote, this blueprint is based on his work and adopted to work with the Styrbar remote. Thank @niro1987!
Button | Action |
---|---|
Dim-Up (short) | User defined action |
Dim-Down (short) | User defined action |
Right (short) | User defined action |
Left (short) | User defined action |
Dim-Up (long) | User defined action |
Dim-Down (long) | User defined action |
Right (long) | User defined action (may trigger “Dim-Up (short)” action, known issue) |
Left (long) | User defined action (may trigger “Dim-Up (short)” action, known issue) |
blueprint:
name: ZHA - IKEA Styrbar - Custom Actions
description: >-
This automation simulates the use of the IKEA Styrbar remote control
connected through ZHA.
domain: automation
input:
remote:
name: IKEA Styrbar remote control
description: Select the remote control you wish to use.
selector:
device:
integration: zha
manufacturer: IKEA of Sweden
model: Remote Control N2
dimup_short:
name: Short Press - Dim Up Button
description: The action to perform on Short Press of the Dim Up Button
selector:
action:
default: []
dimdown_short:
name: Short Press - Dim Down Button
description: The action to perform on Short Press of the Dim Down Button
selector:
action:
default: []
colorup_short:
name: Short Press - Color Up Button
description: The action to perform on Short Press of the Color Up Button
selector:
action:
default: []
colordown_short:
name: Short Press - Color Down Button
description: The action to perform on Short Press of the Color Down Button
selector:
action:
default: []
dimup_long:
name: Long Press - Dim Up Button
description: The action to perform on Long Press of the Dim Up Button
selector:
action:
default: []
dimdown_long:
name: Long Press - Dim Down Button
description: The action to perform on Long Press of the Dim Down Button
selector:
action:
default: []
colorup_long:
name: Long Press - Color Up Button
description: The action to perform on Long Press of the Color Up Button
selector:
action:
default: []
colordown_long:
name: Long Press - Color Down Button
description: The action to perform on Long Press of the Color Down Button
selector:
action:
default: []
mode: restart
max_exceeded: silent
trigger:
- platform: event
event_type: zha_event
event_data:
device_id: !input remote
action:
- choose:
# Short-Press on the dim-up button.
- conditions:
- condition: template
value_template: '{{ trigger.event.data.command == "on" }}'
sequence: !input dimup_short
# Long-Press on the dim-up button.
- conditions:
- condition: template
value_template: '{{ trigger.event.data.command == "move_with_on_off" }}'
sequence: !input dimup_long
# Short-Press on the dim-down button.
- conditions:
- condition: template
value_template: '{{ trigger.event.data.command == "off" }}'
sequence: !input dimdown_short
# Long-Press on the dim-down button.
- conditions:
- condition: template
value_template: '{{ trigger.event.data.command == "move" }}'
sequence: !input dimdown_long
# Short-Press on the color-up button.
- conditions:
- condition: template
value_template: '{{ trigger.event.data.command == "press" }}'
- condition: template
value_template: "{{ trigger.event.data.args == [256,13,0] }}"
sequence: !input colorup_short
# Long-Press on the color-up button.
- conditions:
- condition: template
value_template: '{{ trigger.event.data.command == "hold" }}'
- condition: template
value_template: "{{ trigger.event.data.args == [3328,0] }}"
sequence: !input colorup_long
# Short-Press on the color-down button.
- conditions:
- condition: template
value_template: '{{ trigger.event.data.command == "press" }}'
- condition: template
value_template: "{{ trigger.event.data.args == [257,13,0] }}"
sequence: !input colordown_short
# Long-Press on the color-down button.
- conditions:
- condition: template
value_template: '{{ trigger.event.data.command == "hold" }}'
- condition: template
value_template: "{{ trigger.event.data.args == [3329,0] }}"
sequence: !input colordown_long
# Any other event will cancel the repeat loops.
default: []