Trigger actions from the buttons on an IKEA RODRET wireless dimmer/power switch. Tap, long press and long release are all 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
- RODRET firmware 1.0.57
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.
- For this remote, ‘initial_press’ events are sent immediately when any button is pressed, regardless of whether a button is tapped or held down. This means the only way to distinguish between a tap and a long press is to look for the ‘short_release’ event. Because of this, tap events are processed when a button is released, not when it is pressed.
Based on Lorenzo Cecchelli’s ZHA blueprint for SOMRIG shortcut buttons.
Adapted for RODRET and the Matter integration by Edward Wright.
blueprint:
name: Matter - IKEA RODRET Wireless Dimmer/Power Switch (Model E2201) V1.0
description: >
Trigger actions from the buttons on an IKEA RODRET wireless dimmer/power switch.
Tap, long press and long release are all 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
* RODRET firmware 1.0.57
Notes:
* 'initial_press' events are sent immediately when any button is pressed,
regardless of whether a button is tapped or held down. This means
the only way to distinguish between a tap and a long press is to look
for the 'short_release' event. Because of this, tap events are
processed when a button is released, not when it is pressed.
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 RODRET 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
on_single_press:
name: "Action: On (I) > Tap"
default: []
selector:
action: {}
on_long_press:
name: "Action: On (I) > Long Press"
default: []
selector:
action: {}
on_long_release:
name: "Action: On (I) > Release after Long Press"
default: []
selector:
action: {}
off_single_press:
name: "Action: Off (O) > Tap"
default: []
selector:
action: {}
off_long_press:
name: "Action: Off (O) > Long Press"
default: []
selector:
action: {}
off_long_release:
name: "Action: Off (O) > Release after Long Press"
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'] == 'short_release'
}}
sequence: !input on_single_press
- conditions:
- condition: template
value_template: >-
{{ trigger.entity_id == button_1
}}
- condition: template
value_template: >-
{{ trigger.to_state['attributes']['event_type'] == 'long_press'
}}
sequence: !input on_long_press
- conditions:
- condition: template
value_template: >-
{{ trigger.entity_id == button_1
}}
- condition: template
value_template: >-
{{ trigger.to_state['attributes']['event_type'] == 'long_release'
}}
sequence: !input on_long_release
- conditions:
- condition: template
value_template: >-
{{ trigger.entity_id == button_2
}}
- condition: template
value_template: >-
{{ trigger.to_state['attributes']['event_type'] == 'short_release'
}}
sequence: !input off_single_press
- conditions:
- condition: template
value_template: >-
{{ trigger.entity_id == button_2
}}
- condition: template
value_template: >-
{{ trigger.to_state['attributes']['event_type'] == 'long_press'
}}
sequence: !input off_long_press
- conditions:
- condition: template
value_template: >-
{{ trigger.entity_id == button_2
}}
- condition: template
value_template: >-
{{ trigger.to_state['attributes']['event_type'] == 'long_release'
}}
sequence: !input off_long_release