deConz - IKEA Symfonisk for lights

This Blueprint can be used to control one or more lights with the IKEA SYMFONISK remote connected with deConz.

Functions:

  • One click: Toggle lights
  • Two clicks: Perform assigned action
  • Three clicks: Perform assigned action
  • Turn clockwise: Increase brightness
  • Turn counter clockwise: Decrease brightness
blueprint:
  name: Deconz - IKEA SYMFONISK for lights
  description: 'Control lights with an IKEA SYMFONISK from the Deconz integration.

    Pushing the button once, toggles the lights on/off to the last set
    brightness (unless the force brightness is toggled on in the blueprint).
    Rotating left/right will change the brightness.

    The button can be pressed double or triple, these actions can be assigned
    freely. This allows you to assign, e.g., a scene or anything else.

    Thanks to @Frenck. I modified his ZHA version to make it useful for Deconz.
    '
  domain: automation
  input:
    remote:
      name: Remote
      description: IKEA SYMFONISK to use
      selector:
        device:
          integration: deconz
          manufacturer: IKEA of Sweden
          model: SYMFONISK Sound Controller
    light:
      name: Light(s)
      description: The light(s) to control
      selector:
        target:
          entity:
            domain: light
    force_brightness:
      name: Force turn on brightness
      description: 'Force the brightness to the set level below, when the "on" button
        on the remote is pushed and lights turn on.

        '
      default: false
      selector:
        boolean: {}
    brightness:
      name: Brightness
      description: Brightness of the light(s) when turning on
      default: 50
      selector:
        number:
          min: 0.0
          max: 100.0
          mode: slider
          step: 1.0
          unit_of_measurement: '%'
    double_press:
      name: Double press
      description: Action to run on double press
      default: []
      selector:
        action: {}
    triple_press:
      name: Triple press
      description: Action to run on triple press
      default: []
      selector:
        action: {}
  source_url: https://raw.githubusercontent.com/Sholofly/home-assistant-config/master/blueprints/automation/deconz_ikea_symfonisk_lights.yaml
mode: single
max_exceeded: silent
variables:
  force_brightness: !input 'force_brightness'
trigger:
- platform: event
  event_type: deconz_event
  event_data:
    device_id: !input 'remote'
action:
- variables:
    event: '{{ trigger.event.data.event }}'
- choose:
  - conditions:
    - '{{ event == 1002 }}'
    sequence:
    - choose:
      - conditions: '{{ force_brightness }}'
        sequence:
        - service: light.toggle
          target: !input 'light'
          data:
            transition: 1
            brightness_pct: !input 'brightness'
      default:
      - service: light.toggle
        target: !input 'light'
        data:
          transition: 1
    - delay:
        milliseconds: 100
  - conditions:
    - '{{ event == 2001 }}' #start turning clockwise
    sequence:
    - service: light.turn_on
      target: !input 'light'
      data:
        brightness_step_pct: 5
  - conditions:
    - '{{ event == 3001 }}' #start turning counter clockwise
    sequence:
    - service: light.turn_on
      target: !input 'light'
      data:
        brightness_step_pct: -5
  - conditions:
    - '{{ event == 1004 }}'
    sequence: !input 'double_press'
  - conditions:
    - '{{ event == 1005 }}'
    sequence: !input 'triple_press'

6 Likes