I would like uniform behavior of light siwtches across the house, and only have to change that behavior in a single place.
To start, I would like to write a simple blueprint that has 2 inputs:
- a list of switches (IKEA RODRET)
- a light target
The blueprint should generate an automation, that will react to all switches (their respective on- and off-buttons).
So far i have the following:
blueprint:
name: Ikea Light Switch
description: Turn on/off a light with Ikea RODRET switches
domain: automation
input:
switch_id:
name: Switch
selector:
device:
filter:
#integration: deconz
#manufacturer: IKEA of Sweden
model: RODRET Dimmer
multiple: false
# multiple: true does not work, as there does not
# appear to be a way to create multiple triggers
# based on a device list
target_light:
name: Lights
selector:
target:
entity:
domain: light
triggers:
- device_id: !input switch_id
domain: deconz
type: remote_button_short_release
subtype: turn_on
trigger: device
id: licht-an
- device_id: !input switch_id
domain: deconz
type: remote_button_short_release
subtype: turn_off
trigger: device
id: licht-aus
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- licht-an
sequence:
- action: light.turn_on
metadata: {}
data: {}
target: !input target_light
- conditions:
- condition: trigger
id:
- licht-aus
sequence:
- action: light.turn_off
metadata: {}
data: {}
target: !input target_light
mode: single
Searching for a solution here, I have seent the guide to avoid Device/ids and use entities instead multiple times.
However, I have noticed that the IKEA RODRET switches are registered as device, but I can not find entities (except for the batteries).
instead they have events like
- “Turn on” released
- “Turn on” continuousely pressed
- “Turn on” released after long press
- “Turn off” released
…
If there is a way to react properly using entities, I do not understand how.
Is there any way for me to achieve what I want?