Hey there,
i did a Deconz blueprint of Xelloss99 “ZHA - IKEA Tradfri On/Off Switch”
You can use following events:
- On short press
- Off short press
- On long press
- Off long press
- On long press release
- Off long press release
blueprint:
name: deConz - IKEA wireless on/off switch
description: Control anything using IKEA wireless on/off switch
domain: automation
input:
remote:
name: switch
description: IKEA wireless on/off switch to use
selector:
device:
integration: deconz
manufacturer: IKEA of Sweden
model: TRADFRI on/off switch
button_on_short:
name: On button press
description: Action to run on press of On button
default: []
selector:
action:
button_off_short:
name: Off button press
description: Action to run on press of Off button
default: []
selector:
action:
button_on_long:
name: On button hold
description: Action to run on long press of On button
default: []
selector:
action:
button_off_long:
name: Off button hold
description: Action to run on long press of Off button
default: []
selector:
action:
button_on_release:
name: On button release
description: Action to run on release long press of On button
default: []
selector:
action:
button_off_release:
name: Off button release
description: Action to run on release long press of Off 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_on_short
- conditions:
- "{{ event == 2002 }}"
sequence: !input button_off_short
- conditions:
- "{{ event == 1001 }}"
sequence: !input button_on_long
- conditions:
- "{{ event == 2001 }}"
sequence: !input button_off_long
- conditions:
- "{{ event == 1003 }}"
sequence: !input button_on_release
- conditions:
- "{{ event == 2003 }}"
sequence: !input button_off_release
Have fun with it.