feat: added TRADFRI on/off switch (E1743) (#10)

* Added TRADFRI on/off switch (E1743)

Added TRADFRI on/off switch (E1743)
It operates similar to the RODRET (E2201)

1. Added TRADFRI on/off switch (E1743) to input selector (zha/z2m)
2. Updated descriptions in several areas
3. No changes to triggers or actions are needed as using the rodret code

* Added TRADFRI on/off switch (E1743)

* Added TRADFRI on/off switch (E1743)

Added TRADFRI on/off switch (E1743)
It operates similar to the RODRET (E2201)

1. Added TRADFRI on/off switch (E1743) to input selector (zha/z2m)
2. Updated descriptions in several areas
3. No changes to triggers or actions are needed as using the rodret code

* Add support for IKEA E1743

---------

Co-authored-by: Damien <bonjour@damienrubio.com>
This commit is contained in:
yarafie
2025-02-05 10:54:28 +03:00
committed by GitHub
parent 2376fc95ed
commit 0867b1d025
2 changed files with 93 additions and 71 deletions

View File

@@ -3,9 +3,9 @@ blueprint:
min_version: 2024.10.0 min_version: 2024.10.0
author: damru author: damru
domain: automation domain: automation
name: IKEA Rodret (E2201) or IKEA Somrig (E2213) Controls (ZHA/Z2M) name: IKEA Tradfri on/off (E1743), IKEA Rodret (E2201) or IKEA Somrig (E2213) Controls (ZHA/Z2M)
description: > description: >
## Control anything with **IKEA RODRET** or **IKEA SOMRIG** remotes ## Control anything with **IKEA TRADFRI ON/OFF** or **IKEA RODRET** or **IKEA SOMRIG** remotes
Only for use with [ZHA](https://www.home-assistant.io/integrations/zha/) Only for use with [ZHA](https://www.home-assistant.io/integrations/zha/)
@@ -15,27 +15,33 @@ blueprint:
Available controls: Available controls:
- Single press **on/off** (Rodret) **1 dot/2 dots** (Somrig) - Single press **on/off** (Tradri, Rodret) **1 dot/2 dots** (Somrig)
- Double press **on/off** (Rodret, _Optional_) **1 dot/2 dots** (Somrig) - Double press **on/off** (Tradri, Rodret, _Optional_) **1 dot/2 dots** (Somrig)
- Hold **on/off** (Rodret) **1 dot/2 dots** (Somrig). - Hold **on/off** (Tradfri, Rodret) **1 dot/2 dots** (Somrig).
Actions will be executed every **Hold delay**, but maximum **Max number of loops** times. Actions will be executed every **Hold delay**, but maximum **Max number of loops** times.
input: input:
remote_device: remote_device:
name: Remote name: Remote
description: > description: >
IKEA remote (Somrig, Rodret) to use. IKEA remote (Tradfri, Rodret, Somrig) to use.
default: [] default: []
selector: selector:
device: device:
filter: filter:
- integration: zha
manufacturer: IKEA of Sweden
model: TRADFRI on/off switch
- integration: zha - integration: zha
manufacturer: IKEA of Sweden manufacturer: IKEA of Sweden
model: RODRET Dimmer model: RODRET Dimmer
- integration: zha - integration: zha
manufacturer: IKEA of Sweden manufacturer: IKEA of Sweden
model: SOMRIG shortcut button model: SOMRIG shortcut button
- integration: mqtt
manufacturer: IKEA
model: TRADFRI on/off switch
- integration: mqtt - integration: mqtt
manufacturer: IKEA manufacturer: IKEA
model: RODRET wireless dimmer/power switch model: RODRET wireless dimmer/power switch
@@ -43,6 +49,10 @@ blueprint:
manufacturer: IKEA manufacturer: IKEA
model: SOMRIG shortcut button model: SOMRIG shortcut button
# DEPRECATED - for removal, keeping for z2m v1 backward compatibility # DEPRECATED - for removal, keeping for z2m v1 backward compatibility
- integration: mqtt
manufacturer: IKEA
model: TRADFRI on/off switch (E1743)
# DEPRECATED - for removal, keeping for z2m v1 backward compatibility
- integration: mqtt - integration: mqtt
manufacturer: IKEA manufacturer: IKEA
model: RODRET wireless dimmer/power switch (E2201) model: RODRET wireless dimmer/power switch (E2201)
@@ -53,43 +63,43 @@ blueprint:
multiple: false multiple: false
on_press_action: on_press_action:
name: Press "on / 1 dot" action name: Press "on / 1 dot" action
description: Choose action(s) to run when **on** (Rodret) or **1 dot** (Somrig) button is **pressed**. description: Choose action(s) to run when **on** (Tradfri, Rodret) or **1 dot** (Somrig) button is **pressed**.
default: [] default: []
selector: selector:
action: {} action: {}
off_press_action: off_press_action:
name: Press "off / 2 dots" action name: Press "off / 2 dots" action
description: Choose action(s) to run when **off** (Rodret) or **2 dots** (Somrig) button is **pressed**. description: Choose action(s) to run when **off** (Tradfri, Rodret) or **2 dots** (Somrig) button is **pressed**.
default: [] default: []
selector: selector:
action: {} action: {}
on_hold_action: on_hold_action:
name: Hold "on / 1 dot" action name: Hold "on / 1 dot" action
description: Choose action(s) to run when **on** (Rodret) or **1 dot** (Somrig) button is **held**. description: Choose action(s) to run when **on** (Tradfri, Rodret) or **1 dot** (Somrig) button is **held**.
default: [] default: []
selector: selector:
action: {} action: {}
off_hold_action: off_hold_action:
name: Hold "off / 2 dots" action name: Hold "off / 2 dots" action
description: Choose action(s) to run when **off** (Rodret) or **2 dots** (Somrig) button is **held**. description: Choose action(s) to run when **off** (Tradfri, Rodret) or **2 dots** (Somrig) button is **held**.
default: [] default: []
selector: selector:
action: {} action: {}
on_double_press_action: on_double_press_action:
name: Double press "on / 1 dot" action name: Double press "on / 1 dot" action
description: > description: >
Choose action(s) to run when the **on** (Rodret) or **1 dot** (Somrig) button is **pressed twice**. Choose action(s) to run when the **on** (Tradfri, Rodret) or **1 dot** (Somrig) button is **pressed twice**.
**_NB for Rodret only_**: **Double press event (on)** must be exposed and **Double press delay** interval is used as a timeout. **_NB for Tradfri, Rodret only_**: **Double press event (on)** must be exposed and **Double press delay** interval is used as a timeout.
default: [] default: []
selector: selector:
action: {} action: {}
off_double_press_action: off_double_press_action:
name: Double press "off / 2 dots" action name: Double press "off / 2 dots" action
description: > description: >
Choose action(s) to run when the **off** (Rodret) or **2 dots** (Somrig) button is **pressed twice**. Choose action(s) to run when the **off** (Tradfri, Rodret) or **2 dots** (Somrig) button is **pressed twice**.
**_NB for Rodret only_**: **Double press event (off)** must be exposed and **Double press delay** interval is used as a timeout. **_NB for Tradfri, Rodret only_**: **Double press event (off)** must be exposed and **Double press delay** interval is used as a timeout.
default: [] default: []
selector: selector:
action: {} action: {}
@@ -119,8 +129,8 @@ blueprint:
max: 1000.0 max: 1000.0
step: 1.0 step: 1.0
mode: slider mode: slider
rodret_options_section: tradfri_rodret_options_section:
name: Rodret options name: Tradfri, Rodret options
icon: mdi:remote icon: mdi:remote
collapsed: true collapsed: true
input: input:
@@ -158,7 +168,7 @@ blueprint:
mode: single mode: single
max_exceeded: silent max_exceeded: silent
triggers: triggers:
# RODRET - E2201 # TRADFRI - E1743 + RODRET - E2201
- trigger: event - trigger: event
event_type: zha_event event_type: zha_event
event_data: event_data:
@@ -166,13 +176,13 @@ triggers:
command: "on" command: "on"
cluster_id: 6 cluster_id: 6
endpoint_id: 1 endpoint_id: 1
id: press-on-zha-e2201 id: press-on-zha-e1743-e2201
- trigger: device - trigger: device
domain: mqtt domain: mqtt
device_id: !input remote_device device_id: !input remote_device
type: action type: action
subtype: "on" subtype: "on"
id: press-on-z2m-e2201 id: press-on-z2m-e1743-e2201
- trigger: event - trigger: event
event_type: zha_event event_type: zha_event
event_data: event_data:
@@ -180,13 +190,13 @@ triggers:
command: "off" command: "off"
cluster_id: 6 cluster_id: 6
endpoint_id: 1 endpoint_id: 1
id: press-off-zha-e2201 id: press-off-zha-e1743-e2201
- trigger: device - trigger: device
domain: mqtt domain: mqtt
device_id: !input remote_device device_id: !input remote_device
type: action type: action
subtype: "off" subtype: "off"
id: press-off-z2m-e2201 id: press-off-z2m-e1743-e2201
- trigger: event - trigger: event
event_type: zha_event event_type: zha_event
event_data: event_data:
@@ -195,13 +205,13 @@ triggers:
cluster_id: 8 cluster_id: 8
endpoint_id: 1 endpoint_id: 1
args: [0, 83] args: [0, 83]
id: hold-on-zha-e2201 id: hold-on-zha-e1743-e2201
- trigger: device - trigger: device
domain: mqtt domain: mqtt
device_id: !input remote_device device_id: !input remote_device
type: action type: action
subtype: "brightness_move_up" subtype: "brightness_move_up"
id: hold-on-z2m-e2201 id: hold-on-z2m-e1743-e2201
- trigger: event - trigger: event
event_type: zha_event event_type: zha_event
event_data: event_data:
@@ -210,13 +220,13 @@ triggers:
cluster_id: 8 cluster_id: 8
endpoint_id: 1 endpoint_id: 1
args: [1, 83, 0, 0] args: [1, 83, 0, 0]
id: hold-off-zha-e2201 id: hold-off-zha-e1743-e2201
- trigger: device - trigger: device
domain: mqtt domain: mqtt
device_id: !input remote_device device_id: !input remote_device
type: action type: action
subtype: "brightness_move_down" subtype: "brightness_move_down"
id: hold-off-z2m-e2201 id: hold-off-z2m-e1743-e2201
- trigger: event - trigger: event
event_type: zha_event event_type: zha_event
event_data: event_data:
@@ -224,13 +234,13 @@ triggers:
endpoint_id: 1 endpoint_id: 1
cluster_id: 8 cluster_id: 8
command: stop_with_on_off command: stop_with_on_off
id: release-zha-e2201 id: release-zha-e1743-e2201
- trigger: device - trigger: device
domain: mqtt domain: mqtt
device_id: !input remote_device device_id: !input remote_device
type: action type: action
subtype: "brightness_stop" subtype: "brightness_stop"
id: release-z2m-e2201 id: release-z2m-e1743-e2201
# SOMRIG - E2213 # SOMRIG - E2213
- trigger: event - trigger: event
@@ -345,8 +355,8 @@ actions:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- press-on-zha-e2201 - press-on-zha-e1743-e2201
- press-on-z2m-e2201 - press-on-z2m-e1743-e2201
- press-dots1-zha-e2213 - press-dots1-zha-e2213
- press-dots1-z2m-e2213 - press-dots1-z2m-e2213
sequence: sequence:
@@ -358,7 +368,7 @@ actions:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- press-on-zha-e2201 - press-on-zha-e1743-e2201
sequence: sequence:
- wait_for_trigger: - wait_for_trigger:
- trigger: event - trigger: event
@@ -379,7 +389,7 @@ actions:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- press-on-z2m-e2201 - press-on-z2m-e1743-e2201
sequence: sequence:
- wait_for_trigger: - wait_for_trigger:
- trigger: device - trigger: device
@@ -400,8 +410,8 @@ actions:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- press-off-zha-e2201 - press-off-zha-e1743-e2201
- press-off-z2m-e2201 - press-off-z2m-e1743-e2201
- press-dots2-zha-e2213 - press-dots2-zha-e2213
- press-dots2-z2m-e2213 - press-dots2-z2m-e2213
sequence: sequence:
@@ -413,7 +423,7 @@ actions:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- press-off-zha-e2201 - press-off-zha-e1743-e2201
sequence: sequence:
- wait_for_trigger: - wait_for_trigger:
- trigger: event - trigger: event
@@ -434,7 +444,7 @@ actions:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- press-off-z2m-e2201 - press-off-z2m-e1743-e2201
sequence: sequence:
- wait_for_trigger: - wait_for_trigger:
- trigger: device - trigger: device
@@ -464,11 +474,13 @@ actions:
- double-press-dots2-zha-e2213 - double-press-dots2-zha-e2213
- double-press-dots2-z2m-e2213 - double-press-dots2-z2m-e2213
sequence: !input off_double_press_action sequence: !input off_double_press_action
#
# Actions for up button long press
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- hold-on-zha-e2201 - hold-on-zha-e1743-e2201
- hold-on-z2m-e2201 - hold-on-z2m-e1743-e2201
- hold-dots1-zha-e2213 - hold-dots1-zha-e2213
- hold-dots1-z2m-e2213 - hold-dots1-z2m-e2213
sequence: sequence:
@@ -482,7 +494,7 @@ actions:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- hold-on-zha-e2201 - hold-on-zha-e1743-e2201
- hold-dots1-zha-e2213 - hold-dots1-zha-e2213
sequence: sequence:
- wait_for_trigger: - wait_for_trigger:
@@ -504,7 +516,7 @@ actions:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- hold-on-z2m-e2201 - hold-on-z2m-e1743-e2201
- hold-dots1-z2m-e2213 - hold-dots1-z2m-e2213
sequence: sequence:
- wait_for_trigger: - wait_for_trigger:
@@ -529,8 +541,8 @@ actions:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- hold-off-zha-e2201 - hold-off-zha-e1743-e2201
- hold-off-z2m-e2201 - hold-off-z2m-e1743-e2201
- hold-dots2-zha-e2213 - hold-dots2-zha-e2213
- hold-dots2-z2m-e2213 - hold-dots2-z2m-e2213
sequence: sequence:
@@ -544,7 +556,7 @@ actions:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- hold-off-zha-e2201 - hold-off-zha-e1743-e2201
- hold-dots2-zha-e2213 - hold-dots2-zha-e2213
sequence: sequence:
- wait_for_trigger: - wait_for_trigger:
@@ -566,7 +578,7 @@ actions:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- hold-off-z2m-e2201 - hold-off-z2m-e1743-e2201
- hold-dots2-z2m-e2213 - hold-dots2-z2m-e2213
sequence: sequence:
- wait_for_trigger: - wait_for_trigger:

View File

@@ -3,9 +3,9 @@ blueprint:
min_version: 2024.10.0 min_version: 2024.10.0
author: damru author: damru
domain: automation domain: automation
name: IKEA Rodret (E2201) or IKEA Somrig (E2213) Light control (ZHA/Z2M) name: IKEA Tradfri (E1743) or IKEA Rodret (E2201) or IKEA Somrig (E2213) Light control (ZHA/Z2M)
description: > description: >
## Control a light with **IKEA RODRET** or **IKEA SOMRIG** remotes ## Control a light with **IKEA TRADFRI ON/OFF** or **IKEA RODRET** or **IKEA SOMRIG** remotes
Only for use with [ZHA](https://www.home-assistant.io/integrations/zha/) Only for use with [ZHA](https://www.home-assistant.io/integrations/zha/)
@@ -15,29 +15,35 @@ blueprint:
Available controls: Available controls:
- Press **on** (Rodret) or **1 dot** (Somrig) to turn on the light - Press **on** (Tradfri, Rodret) or **1 dot** (Somrig) to turn on the light
(Optional: set the target brightness by enabling **Force Brightness** and setting a **Brightness** value) (Optional: set the target brightness by enabling **Force Brightness** and setting a **Brightness** value)
- Press **off** (Rodret) or **2 dots** (Somrig) to turn off the light - Press **off** (Tradfri, Rodret) or **2 dots** (Somrig) to turn off the light
- Hold **on** (Rodret) or **1 dot** (Somrig) button to increase the brightness - Hold **on** (Tradfri, Rodret) or **1 dot** (Somrig) button to increase the brightness
- Hold **off** (Rodret) or **2 dots** (Somrig) button to decrease the brightness down to 1% - Hold **off** (Tradfri, Rodret) or **2 dots** (Somrig) button to decrease the brightness down to 1%
input: input:
remote_device: remote_device:
name: Remote name: Remote
description: > description: >
IKEA remote (Rodret, Somrig) to use. IKEA remote (Tradfri, Rodret, Somrig) to use.
default: "" default: ""
selector: selector:
device: device:
filter: filter:
- integration: zha
manufacturer: IKEA of Sweden
model: TRADFRI on/off switch
- integration: zha - integration: zha
manufacturer: IKEA of Sweden manufacturer: IKEA of Sweden
model: RODRET Dimmer model: RODRET Dimmer
- integration: zha - integration: zha
manufacturer: IKEA of Sweden manufacturer: IKEA of Sweden
model: SOMRIG shortcut button model: SOMRIG shortcut button
- integration: mqtt
manufacturer: IKEA
model: TRADFRI on/off switch
- integration: mqtt - integration: mqtt
manufacturer: IKEA manufacturer: IKEA
model: RODRET wireless dimmer/power switch model: RODRET wireless dimmer/power switch
@@ -45,6 +51,10 @@ blueprint:
manufacturer: IKEA manufacturer: IKEA
model: SOMRIG shortcut button model: SOMRIG shortcut button
# DEPRECATED - for removal, keeping for z2m v1 backward compatibility # DEPRECATED - for removal, keeping for z2m v1 backward compatibility
- integration: mqtt
manufacturer: IKEA
model: TRADFRI on/off switch (E1743)
# DEPRECATED - for removal, keeping for z2m v1 backward compatibility
- integration: mqtt - integration: mqtt
manufacturer: IKEA manufacturer: IKEA
model: RODRET wireless dimmer/power switch (E2201) model: RODRET wireless dimmer/power switch (E2201)
@@ -88,7 +98,7 @@ blueprint:
mode: restart mode: restart
max_exceeded: silent max_exceeded: silent
triggers: triggers:
# RODRET - E2201 # TRADFRI - E1743 + RODRET - E2201
- trigger: event - trigger: event
event_type: zha_event event_type: zha_event
event_data: event_data:
@@ -96,13 +106,13 @@ triggers:
command: "on" command: "on"
cluster_id: 6 cluster_id: 6
endpoint_id: 1 endpoint_id: 1
id: press-on-zha-e2201 id: press-on-zha-e1743-e2201
- trigger: device - trigger: device
domain: mqtt domain: mqtt
device_id: !input remote_device device_id: !input remote_device
type: action type: action
subtype: "on" subtype: "on"
id: press-on-z2m-e2201 id: press-on-z2m-e1743-e2201
- trigger: event - trigger: event
event_type: zha_event event_type: zha_event
event_data: event_data:
@@ -110,13 +120,13 @@ triggers:
command: "off" command: "off"
cluster_id: 6 cluster_id: 6
endpoint_id: 1 endpoint_id: 1
id: press-off-zha-e2201 id: press-off-zha-e1743-e2201
- trigger: device - trigger: device
domain: mqtt domain: mqtt
device_id: !input remote_device device_id: !input remote_device
type: action type: action
subtype: "off" subtype: "off"
id: press-off-z2m-e2201 id: press-off-z2m-e1743-e2201
- trigger: event - trigger: event
event_type: zha_event event_type: zha_event
event_data: event_data:
@@ -125,13 +135,13 @@ triggers:
cluster_id: 8 cluster_id: 8
endpoint_id: 1 endpoint_id: 1
args: [0, 83] args: [0, 83]
id: hold-on-zha-e2201 id: hold-on-zha-e1743-e2201
- trigger: device - trigger: device
domain: mqtt domain: mqtt
device_id: !input remote_device device_id: !input remote_device
type: action type: action
subtype: "brightness_move_up" subtype: "brightness_move_up"
id: hold-on-z2m-e2201 id: hold-on-z2m-e1743-e2201
- trigger: event - trigger: event
event_type: zha_event event_type: zha_event
event_data: event_data:
@@ -140,13 +150,13 @@ triggers:
cluster_id: 8 cluster_id: 8
endpoint_id: 1 endpoint_id: 1
args: [1, 83, 0, 0] args: [1, 83, 0, 0]
id: hold-off-zha-e2201 id: hold-off-zha-e1743-e2201
- trigger: device - trigger: device
domain: mqtt domain: mqtt
device_id: !input remote_device device_id: !input remote_device
type: action type: action
subtype: "brightness_move_down" subtype: "brightness_move_down"
id: hold-off-z2m-e2201 id: hold-off-z2m-e1743-e2201
- trigger: event - trigger: event
event_type: zha_event event_type: zha_event
event_data: event_data:
@@ -154,13 +164,13 @@ triggers:
command: stop_with_on_off command: stop_with_on_off
endpoint_id: 1 endpoint_id: 1
cluster_id: 8 cluster_id: 8
id: release-zha-e2201 id: release-zha-e1743-e2201
- trigger: device - trigger: device
domain: mqtt domain: mqtt
device_id: !input remote_device device_id: !input remote_device
type: action type: action
subtype: "brightness_stop" subtype: "brightness_stop"
id: release-z2m-e2201 id: release-z2m-e1743-e2201
# SOMRIG - E2213 # SOMRIG - E2213
- trigger: event - trigger: event
@@ -277,8 +287,8 @@ actions:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- press-on-zha-e2201 - press-on-zha-e1743-e2201
- press-on-z2m-e2201 - press-on-z2m-e1743-e2201
- press-dots1-zha-e2213 - press-dots1-zha-e2213
- press-dots1-z2m-e2213 - press-dots1-z2m-e2213
sequence: sequence:
@@ -298,8 +308,8 @@ actions:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- press-off-zha-e2201 - press-off-zha-e1743-e2201
- press-off-z2m-e2201 - press-off-z2m-e1743-e2201
- press-dots2-zha-e2213 - press-dots2-zha-e2213
- press-dots2-z2m-e2213 - press-dots2-z2m-e2213
sequence: sequence:
@@ -310,8 +320,8 @@ actions:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- hold-on-zha-e2201 - hold-on-zha-e1743-e2201
- hold-on-z2m-e2201 - hold-on-z2m-e1743-e2201
- hold-dots1-zha-e2213 - hold-dots1-zha-e2213
- hold-dots1-z2m-e2213 - hold-dots1-z2m-e2213
sequence: sequence:
@@ -319,8 +329,8 @@ actions:
while: while:
- condition: trigger - condition: trigger
id: id:
- hold-on-zha-e2201 - hold-on-zha-e1743-e2201
- hold-on-z2m-e2201 - hold-on-z2m-e1743-e2201
- hold-dots1-zha-e2213 - hold-dots1-zha-e2213
- hold-dots1-z2m-e2213 - hold-dots1-z2m-e2213
sequence: sequence:
@@ -335,8 +345,8 @@ actions:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- hold-off-zha-e2201 - hold-off-zha-e1743-e2201
- hold-off-z2m-e2201 - hold-off-z2m-e1743-e2201
- hold-dots2-zha-e2213 - hold-dots2-zha-e2213
- hold-dots2-z2m-e2213 - hold-dots2-z2m-e2213
sequence: sequence: