Trigger actions from the buttons on an IKEA TRADFRI on/off switch (E1743). Only tap events are supported. Requires an IKEA DIRIGERA hub connected to Home Assistant via the Matter integration.
Tested with:
- Home Assistant 2024.10.4
- DIRIGERA firmware 2.660.5
- TRADFRI (E1743) firmware 24.4.6
Note: While writing automations for various IKEA remotes via Matter I have come across many inconsistencies in the Matter implementation from model to model. This has - unfortunately - resulted in a bunch of model-specific blueprints designed to work around these differences where possible.
Based on Lorenzo Cecchelli’s ZHA blueprint for SOMRIG shortcut buttons.
Adapted for TRADFRI (E1743) and the Matter integration by Edward Wright.
blueprint:
name: Matter - IKEA TRADFRI On/Off Switch (Model E1743) V1.0
description: >
Trigger actions from the buttons on an IKEA TRADFRI on/off switch. Only tap events
are supported. Requires an IKEA DIRIGERA hub connected to Home Assistant via
the [Matter integration](https://www.home-assistant.io/integrations/matter).
Tested with:
* Home Assistant 2024.10.4
* DIRIGERA firmware 2.660.5
* TRADFRI (E1743) firmware 24.4.6
Based on [Lorenzo Cecchelli](https://community.home-assistant.io/u/cecche/summary)'s [ZHA blueprint](https://community.home-assistant.io/t/ikea-somrig-remote-e2213-zha/668671) for SOMRIG shortcut buttons.
Adapted for TRADFRI (E1743) and the Matter integration by [Edward Wright](https://community.home-assistant.io/u/fasteddy516/summary).
author: Edward Wright
domain: automation
input:
on_button:
name: 'On (I) Button Event'
description: The entity corresponding to the on button event.
selector:
entity:
multiple: false
filter:
- integration: matter
domain: event
device_class: button
off_button:
name: 'Off (O) Button Event'
description: The entity corresponding to the off button event.
selector:
entity:
multiple: false
filter:
- integration: matter
domain: event
device_class: button
lockout_time:
name: Lockout Time
description: The time to wait before accepting another button press after a
button press has been detected. Use this to prevent multiple actions from
being triggered by a single button press.
default: 250
selector:
number:
min: 0
max: 1000
unit_of_measurement: milliseconds
mode: slider
on_single_press:
name: "Action: On (I) > Tap"
default: []
selector:
action: {}
off_single_press:
name: "Action: Off (O) > Tap"
default: []
selector:
action: {}
mode: single
max_exceeded: silent
triggers:
- trigger: state
entity_id:
- !input on_button
- !input off_button
actions:
- variables:
button_1: !input on_button
button_2: !input off_button
- choose:
- conditions:
- condition: template
value_template: >-
{{ trigger.entity_id == button_1
}}
- condition: template
value_template: >-
{{ trigger.to_state['attributes']['event_type'] == 'initial_press'
}}
sequence: !input on_single_press
- conditions:
- condition: template
value_template: >-
{{ trigger.entity_id == button_2
}}
- condition: template
value_template: >-
{{ trigger.to_state['attributes']['event_type'] == 'initial_press'
}}
sequence: !input off_single_press
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: !input lockout_time