Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lumascet/8c9c813103859035de59789e35261446 to your computer and use it in GitHub Desktop.
Save lumascet/8c9c813103859035de59789e35261446 to your computer and use it in GitHub Desktop.
IKEA symfonsic gen2 button mapping
blueprint:
name: ZHA - IKEA Symfonisk sound controller GEN2 for media and dot-buttons control
description:
Control media with an IKEA Symfonisk sound controller GEN2 (Square
one). Full media control with the media buttons (play/pause, volume up/down and
skip/previous track). Fully customisable dot-buttons, with options for single,
double and long press for each one.
domain: automation
input:
remote:
name: Remote
description: IKEA Symfonisk controller GEN2 to use
selector:
device:
integration: zha
manufacturer: IKEA of Sweden
model: SYMFONISK sound remote gen2
multiple: false
press_play:
name: Press Play
description: Action to run when Play button is pressed
default: []
selector:
action: {}
press_volume_up:
name: Press Volume Up
description: Action to run when Volume Up button is pressed
default: []
selector:
action: {}
press_volume_down:
name: Press Volume Down
description: Action to run when Volume Down button is pressed
default: []
selector:
action: {}
press_previous_track:
name: Press Previous Track
description: Action to run when Previous Track button is pressed
default: []
selector:
action: {}
press_next_track:
name: Press Next Track
description: Action to run when Next Track button is pressed
default: []
selector:
action: {}
single_dot_single_press:
name: Single dot (Single press)
description: Action to run on single dot press
default: []
selector:
action: {}
single_dot_double_press:
name: Single dot (Double press)
description: Action to run on single dot double press
default: []
selector:
action: {}
single_dot_long_press:
name: Single dot (Long press)
description: Action to run on single dot long press
default: []
selector:
action: {}
double_dot_single_press:
name: Double dot (Single press)
description: Action to run on double dot press
default: []
selector:
action: {}
double_dot_double_press:
name: Double dot (Double press)
description: Action to run on double dot double press
default: []
selector:
action: {}
double_dot_long_press:
name: Double dot (Long press)
description: Action to run on double dot long press
default: []
selector:
action: {}
volume_loop_speed:
name: (Optional) Volume velocity on button hold down
description:
Sets volume velocity when volume buttons are held down.
default: 5
selector:
number:
min: 1
max: 50
mode: slider
step: 1
source_url: https://gist.github.com/lumascet/8c9c813103859035de59789e35261446
mode: single
max_exceeded: silent
trigger:
- platform: event
event_type: zha_event
event_data:
device_id: !input remote
action:
- variables:
command: "{{ trigger.event.data.command }}"
cluster_id: "{{ trigger.event.data.cluster_id }}"
endpoint_id: "{{ trigger.event.data.endpoint_id }}"
args: "{{ trigger.event.data.args }}"
volume_loop_speed: !input volume_loop_speed
- choose:
- conditions:
- "{{ command == 'toggle' }}"
- "{{ cluster_id == 6 }}"
- "{{ endpoint_id == 1 }}"
sequence: !input press_play
- conditions:
- "{{ command == 'move_with_on_off' }}"
- "{{ cluster_id == 8 }}"
- "{{ endpoint_id == 1 }}"
- "{{ trigger.event.data.params.move_mode == 0}}"
sequence: !input press_volume_up
- conditions:
- "{{ command == 'move' }}"
- "{{ cluster_id == 8 }}"
- "{{ endpoint_id == 1 }}"
- "{{ trigger.event.data.params.move_mode == 0}}"
sequence:
repeat:
while: "{{repeat.index <= volume_loop_speed | int }}"
sequence: !input press_volume_up
- conditions:
- "{{ command == 'move_with_on_off' }}"
- "{{ cluster_id == 8 }}"
- "{{ endpoint_id == 1 }}"
- "{{ trigger.event.data.params.move_mode == 1 }}"
sequence: !input press_volume_down
- conditions:
- "{{ command == 'move' }}"
- "{{ cluster_id == 8 }}"
- "{{ endpoint_id == 1 }}"
- "{{ trigger.event.data.params.move_mode == 1 }}"
sequence:
repeat:
while: "{{repeat.index <= volume_loop_speed | int }}"
sequence: !input press_volume_down
- conditions:
- "{{ command == 'step' }}"
- "{{ cluster_id == 8 }}"
- "{{ endpoint_id == 1 }}"
- "{{ trigger.event.data.params.step_mode == 0 }}"
sequence: !input press_next_track
- conditions:
- "{{ command == 'step' }}"
- "{{ cluster_id == 8 }}"
- "{{ endpoint_id == 1 }}"
- "{{ trigger.event.data.params.step_mode == 1 }}"
sequence: !input press_previous_track
- conditions:
- "{{ command == 'short_release' }}"
- "{{ endpoint_id == 2 }}"
sequence: !input single_dot_single_press
- conditions:
- "{{ command == 'multi_press_complete' }}"
- "{{ endpoint_id == 2 }}"
sequence: !input single_dot_double_press
- conditions:
- "{{ command == 'long_press' }}"
- "{{ endpoint_id == 2 }}"
sequence: !input single_dot_long_press
- conditions:
- "{{ command == 'short_release' }}"
- "{{ endpoint_id == 3 }}"
sequence: !input double_dot_single_press
- conditions:
- "{{ command == 'multi_press_complete' }}"
- "{{ endpoint_id == 3 }}"
sequence: !input double_dot_double_press
- conditions:
- "{{ command == 'long_press' }}"
- "{{ endpoint_id == 3 }}"
sequence: !input double_dot_long_press
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment