deCONZ - Ikea Tradfri Shortcut Button

based on this Tradfri on/off Button Blueprint.

blueprint:
  name: deCONZ - Tradfri Shortcut Button
  description: 'Control anything using Tradfri Shortcut Button remote'
  domain: automation
  input:
    remote:
      name: Remote
      description: Tradfri Shortcut Button to use
      selector:
        device:
          integration: deconz
          manufacturer: IKEA of Sweden
          model: TRADFRI SHORTCUT Button
    button_short:
      name: Button short press
      description: Action to run on press button
      default: []
      selector:
        action: {}
    button_long:
      name: Button long press
      description: Action to run on hold button
      default: []
      selector:
        action: {}
    
mode: restart
max_exceeded: silent
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: !input 'button_short'
  - conditions:
    - '{{ event == 1001 }}'
    sequence: !input 'button_long'
9 Likes

Nice
I havenā€™t got a shortcut button myself to test for you. But the code looks good :+1:

Thanks! I really like them. I got two of them and they work good so far. Deconz already supports them but they do not show up in the phoscon app. In HA you can not directly control them via Devices, but the events work. So the Blueprint makes even more sense here!

How do I have to add the shortcut button in order to use that blueprint? First adding the button to deconz?

Search for new devices in the Phoscon app (it wont show up there as the app is not updated yet). Just look into your devices in the Deconz Integration in Home Assistant. Once your device is listed you can use it via the blueprint. Its a little confusing right now but the button works fine.

Thanks for the blueprint. Whatā€™s the difference between yours and the one it is based on?

I am facing the same problem. Please give some solution to us.

this blueprint is for the new ikea Tradfri shortcut button while the one itā€™s based on is the ikea Tradfri on/off button.

they both work very similar except that the shortcut button only has one button while the on/off button has two.

@McGlynn @vbaros

Ups. Sorry I didnā€™t notice the title. Cool. Iā€™ll try it.

Can you add my homeassistant button?

i might do this when I get some time on my hands, iam pretty busy atm.

you can add the blueprint this way:

copy url of this thread -> go to blueprints in the ui -> add template -> paste the link

Thanks. Yes I already added it that way and it works perfectly. In the current deconz version the button is detected and reported to HA but it is not visible in phoscon interface.

Suddenly Deconz started sending double events for the shortcut button. Does anyone have the same problem?

i havenā€™t experienced them yet. a quick fix would be to set mode to ā€œsingleā€ and put a 1s delay after the choose condition.

That works perfectly. Thanks.

please help me.
i have error message in blueprint:

unknown tag !<!input> at line 33, column 31:
device_id: !input ā€˜remoteā€™

Hi! Thanks for your work! I add shortcut button from phoscon beta, but in home assistnt i see only device (without entiies). I add your bluepint but not works. Log say ā€œtrigger missingā€

Hey @Sam04,

Potentially dumb question, can the shortcut buttons support double and triple clicks at this early stage?

Cheers

Linton

Today Iā€™ve added a shortcut button in HA via deCONZ. Next step was using this blueprint.
Unfortunately Iā€™m not able to have this work properly. I receive this error:

Error: UndefinedError: ā€˜dict objectā€™ has no attribute ā€˜eventā€™

The only thing I did, was creating blueprint, add the button, add the device, and that should be it.
Also a normal automation doesnā€™t work.

This is my config:

mode: restart
max_exceeded: silent
trigger:
  - platform: event
    event_type: deconz_event
    event_data:
      device_id: df5f2d33873742bbfb77edd8bdee8bc9
action:
  - variables:
      event: '{{ trigger.event.data.event }}'
  - choose:
      - conditions:
          - '{{ event == 1002 }}'
        sequence:
          - type: toggle
            device_id: d07ead29591e4ad941226cff43833e7b
            entity_id: switch.kantoor_ventilator
            domain: switch
      - conditions:
          - '{{ event == 1001 }}'
        sequence: []
id: '1629292114900'
alias: deCONZ - Tradfri Shortcut Button
description: ''

What am I doing wrong here @Sam04 ?

Thanks for your help

@Sam04 Iā€™m on the latest version of Home Assistant (hassio/supervised), using the latest version of the deCONZ addon, and a Conbee II updated with the latest firmware - lā€™ve added/synced my (one and only) Ikea Tradfri Shortcut button in Phoscon (successfully from what I can tell). Home Assistant lists it as well, I can see the battery level (100%) but it does not work in automations, not by event nor via blueprint - what can I do/check to try and resolve this?