feat(somrig): Add IKEA Somrig remote to blueprint (#1)

This commit is contained in:
Damien
2024-02-21 14:24:34 +01:00
committed by GitHub
parent c06738c7e5
commit 8a70967bb4
2 changed files with 401 additions and 136 deletions

View File

@@ -1,6 +1,7 @@
blueprint: blueprint:
name: IKEA Rodret Dimmer Controls (ZHA/Z2M) name: IKEA Rodret (E2201) or IKEA Somrig (E2213) Controls (ZHA/Z2M)
description: "## Control anything with IKEA RODRET Dimmer remote (v1.2) description: >
## Control anything with **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/)
@@ -10,106 +11,78 @@ blueprint:
Available controls: Available controls:
- Press the **on** or **off** buttons - Single press **on/off** (Rodret) **1 dot/2 dots** (Somrig)
- Double press the **on** or **off** buttons (optional) in **Helper - Double press delay** interval. When disabled, there will be no delay for the simple press actions - Double press **on/off** (Rodret, _Optional_) **1 dot/2 dots** (Somrig)
- Press and hold the **on**/**off** buttons. Actions will be executed every **Helper - Hold delay**, but maximum **Helper - Max number of loops** times. - Hold **on/off** (Rodret) **1 dot/2 dots** (Somrig).
" Actions will be executed every **Helper - Hold delay**, but maximum **Helper - Max number of loops** times.
domain: automation domain: automation
input: input:
remote_device: remote_device:
name: (ZHA) Remote name: (ZHA) Remote
description: IKEA remote to use. **_Choose if you are using ZHA._** description: >
default: "" **_Choose if you are using ZHA._** IKEA remote to use.
default: []
selector: selector:
device: device:
filter: filter:
integration: zha - integration: zha
manufacturer: IKEA of Sweden manufacturer: IKEA of Sweden
model: RODRET Dimmer model: RODRET Dimmer
- integration: zha
manufacturer: IKEA of Sweden
model: SOMRIG shortcut button
multiple: false multiple: false
remote_name: remote_name:
name: (Zigbee2MQTT) Remote Name name: (Zigbee2MQTT) Remote Name
description: The name of the controller (e.g. IKEA Rodret). **_Choose if you are using Zigbee2MQTT._** description: >
default: "" **_Choose if you are using Zigbee2MQTT._** The name of the controller (e.g. IKEA Rodret).
default: []
base_topic: base_topic:
name: (Zigbee2MQTT) Base mqtt topic name: (Zigbee2MQTT) Base mqtt topic
description: The topic configured in [Z2M addon](https://www.zigbee2mqtt.io/guide/usage/mqtt_topics_and_messages.html). description: The topic configured in [Z2M addon](https://www.zigbee2mqtt.io/guide/usage/mqtt_topics_and_messages.html).
default: zigbee2mqtt default: zigbee2mqtt
on_press_action: on_press_action:
name: On - Single press action name: Single press action (on / 1 dot)
description: Choose action(s) to run when **on** button is pressed. description: Choose action(s) to run when **on** (Rodret) or **1 dot** (Somrig) button is **pressed**.
default: [] default: []
selector: selector:
action: {} action: {}
off_press_action: off_press_action:
name: Off - Single press action name: Single press action (off / 2 dots)
description: Choose action(s) to run when **off** button is **pressed**. description: Choose action(s) to run when **off** (Rodret) or **2 dots** (Somrig) button is **pressed**.
default: [] default: []
selector: selector:
action: {} action: {}
on_hold_action: on_hold_action:
name: On - Hold action name: Hold action (on / 1 dot)
description: Choose action(s) to run when **on** button is **pressed and hold**. description: Choose action(s) to run when **on** (Rodret) or **1 dot** (Somrig) button is **held**.
default: [] default: []
selector: selector:
action: {} action: {}
off_hold_action: off_hold_action:
name: Off - Hold action name: Hold action (off / 2 dots)
description: Choose action(s) to run when **off** button is **pressed and hold**. description: Choose action(s) to run when **off** (Rodret) or **2 dots** (Somrig) button is **held**.
default: [] default: []
selector: selector:
action: {} action: {}
on_double_press:
name: On - Double press event
description:
Choose whether or not to expose the virtual **double press** event
for the **on** button. Turn this on if you are providing an action for the **on**
button double press event.
default: false
selector:
boolean: {}
on_double_press_action: on_double_press_action:
name: On - Double press action name: Double press action (on / 1 dot)
description: description: >
Choose action(s) to run when pressing the **on** button twice in **Helper - Double press Choose action(s) to run when the **on** (Rodret) or **1 dot** (Somrig) button is **pressed twice**.
delay** interval. **On - Double press event** must be exposed. (**_NB for Rodret only_**: **Double press event (on)** must be exposed and **Helper - Double press delay** interval is used as a timeout.)
default: [] default: []
selector: selector:
action: {} action: {}
off_double_press:
name: Off - Double press event
description:
Choose whether or not to expose the virtual **double press** event
for the **off** button. Turn this on if you are providing an action for the **off**
button double press event.
default: false
selector:
boolean: {}
off_double_press_action: off_double_press_action:
name: Off - Double press action name: Double press action (off / 2 dots)
description: description: >
Choose action(s) to run when pressing the **off** button twice in **Helper - Double press Choose action(s) to run when the **off** (Rodret) or **2 dots** (Rodret) button is **pressed twice**.
delay** interval. **Off - Double press event** must be exposed. (**_NB for Rodret only_**: **Double press event (off)** must be exposed and **Helper - Double press delay** interval is used as a timeout.)
default: [] default: []
selector: selector:
action: {} action: {}
helper_double_press_delay:
name: Helper - Double press delay
description:
Max delay between the first and the second button press for the
**Double press events**. Provide a value only if you are using a double press action.
Increase this value if you notice that the double press action is not triggered
properly.
default: 250
selector:
number:
unit_of_measurement: milliseconds
min: 100.0
max: 5000.0
step: 10.0
mode: slider
helper_hold_delay: helper_hold_delay:
name: Helper - Hold delay name: Helper - Hold delay
description: Delay between the execution of the **Hold** action(s). description: Delay between the execution of the **Hold** action(s).
@@ -131,104 +104,244 @@ blueprint:
max: 1000.0 max: 1000.0
step: 1.0 step: 1.0
mode: slider mode: slider
on_double_press_exposed:
name: (Rodret only) Double press event (on)
description: >
**_(Rodret only)_** Choose whether or not to expose the virtual **double press** event for the **on** button.
Turn this on if you are providing action(s) for the **Double press action (on / 1 dot)**.
default: false
selector:
boolean: {}
off_double_press_exposed:
name: (Rodret only) Double press event (off)
description: >
**_(Rodret only)_** Choose whether or not to expose the virtual **double press** event for the **off** button.
Turn this on if you are providing an action for the **Double press action (off / 2 dots)**.
default: false
selector:
boolean: {}
helper_double_press_delay:
name: (Rodret only) Helper - Double press delay
description: >
**(Rodret only)** Max delay between the first and the second button press for the
**Double press events**. Provide a value only if you are using a double press action.
Increase this value if you notice that the double press action is not triggered
properly.
default: 250
selector:
number:
unit_of_measurement: milliseconds
min: 100.0
max: 5000.0
step: 10.0
mode: slider
mode: single mode: single
max_exceeded: silent max_exceeded: silent
trigger_variables: trigger_variables:
z2m_base_topic: !input base_topic z2m_base_topic: !input base_topic
z2m_controller: !input remote_name z2m_controller: !input remote_name
zha_remote: !input remote_device zha_controller: !input remote_device
trigger: trigger:
# RODRET - E2201
- platform: event - platform: event
event_type: zha_event event_type: zha_event
event_data: event_data:
device_id: "{{ zha_remote }}" device_id: "{{ zha_controller }}"
command: "on" command: "on"
cluster_id: 6 cluster_id: 6
endpoint_id: 1 endpoint_id: 1
id: press-on-zha id: press-on-zha-e2201
- platform: mqtt - platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}" topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "on" payload: "on"
id: press-on-z2m id: press-on-z2m-e2201
- platform: event - platform: event
event_type: zha_event event_type: zha_event
event_data: event_data:
device_id: "{{ zha_remote }}" device_id: "{{ zha_controller }}"
command: "off" command: "off"
cluster_id: 6 cluster_id: 6
endpoint_id: 1 endpoint_id: 1
id: press-off-zha id: press-off-zha-e2201
- platform: mqtt - platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}" topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "off" payload: "off"
id: press-off-z2m id: press-off-z2m-e2201
- platform: event - platform: event
event_type: zha_event event_type: zha_event
event_data: event_data:
device_id: "{{ zha_remote }}" device_id: "{{ zha_controller }}"
command: "move_with_on_off" command: "move_with_on_off"
cluster_id: 8 cluster_id: 8
endpoint_id: 1 endpoint_id: 1
args: [0, 83] args: [0, 83]
id: hold-on-zha id: hold-on-zha-e2201
- platform: mqtt - platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}" topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "brightness_move_up" payload: "brightness_move_up"
id: hold-on-z2m id: hold-on-z2m-e2201
- platform: event - platform: event
event_type: zha_event event_type: zha_event
event_data: event_data:
device_id: "{{ zha_remote }}" device_id: "{{ zha_controller }}"
command: "move" command: "move"
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 id: hold-off-zha-e2201
- platform: mqtt - platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}" topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "brightness_move_down" payload: "brightness_move_down"
id: hold-off-z2m id: hold-off-z2m-e2201
- platform: event - platform: event
event_type: zha_event event_type: zha_event
event_data: event_data:
device_id: "{{ zha_remote }}" device_id: "{{ zha_controller }}"
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 id: release-zha-e2201
- platform: mqtt - platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}" topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "brightness_stop" payload: "brightness_stop"
id: release-z2m id: release-z2m-e2201
# SOMRIG - E2213
- platform: event
event_type: zha_event
event_data:
device_id: "{{ zha_controller }}"
command: "short_release"
cluster_id: 64640
endpoint_id: 1
args: [0]
id: press-dots1-zha-e2213
- platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "1_short_release"
id: press-dots1-z2m-e2213
- platform: event
event_type: zha_event
event_data:
device_id: "{{ zha_controller }}"
command: "short_release"
cluster_id: 64640
endpoint_id: 2
args: [0]
id: press-dots2-zha-e2213
- platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "2_short_release"
id: press-dots2-z2m-e2213
- platform: event
event_type: zha_event
event_data:
device_id: "{{ zha_controller }}"
command: "multi_press_complete"
cluster_id: 64640
endpoint_id: 1
args: [0, 2]
id: double-press-dots1-zha-e2213
- platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "1_double_press"
id: double-press-dots1-z2m-e2213
- platform: event
event_type: zha_event
event_data:
device_id: "{{ zha_controller }}"
command: "multi_press_complete"
cluster_id: 64640
endpoint_id: 2
args: [0, 2]
id: double-press-dots2-zha-e2213
- platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "2_double_press"
id: double-press-dots2-z2m-e2213
- platform: event
event_type: zha_event
event_data:
device_id: "{{ zha_controller }}"
command: "long_press"
cluster_id: 64640
endpoint_id: 1
args: [0]
id: hold-dots1-zha-e2213
- platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "1_long_press"
id: hold-dots1-z2m-e2213
- platform: event
event_type: zha_event
event_data:
device_id: "{{ zha_controller }}"
command: "long_press"
cluster_id: 64640
endpoint_id: 2
args: [0]
id: hold-dots2-zha-e2213
- platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "2_long_press"
id: hold-dots2-z2m-e2213
- platform: event
event_type: zha_event
event_data:
device_id: "{{ zha_controller }}"
command: "long_release"
cluster_id: 64640
endpoint_id: 1
args: [0]
id: release-hold-dots1-zha-e2213
- platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "1_long_release"
id: release-hold-dots1-z2m-e2213
- platform: event
event_type: zha_event
event_data:
device_id: "{{ zha_controller }}"
command: "long_release"
cluster_id: 64640
endpoint_id: 2
args: [0]
id: release-hold-dots2-zha-e2213
- platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "2_long_release"
id: release-hold-dots2-z2m-e2213
action: action:
- variables: - variables:
on_double_press: !input on_double_press on_double_press_exposed: !input on_double_press_exposed
off_double_press: !input off_double_press off_double_press_exposed: !input off_double_press_exposed
zha_remote: !input remote_device zha_controller: !input remote_device
z2m_base_topic: !input base_topic z2m_base_topic: !input base_topic
z2m_controller: !input remote_name z2m_controller: !input remote_name
- choose: - choose:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- press-on-zha - press-on-zha-e2201
- press-on-z2m - press-on-z2m-e2201
- press-dots1-zha-e2213
- press-dots1-z2m-e2213
sequence: sequence:
- if: - if:
- condition: template - condition: template
value_template: "{{ on_double_press }}" value_template: "{{ on_double_press_exposed }}"
then: then:
- choose: - choose:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- press-on-zha - press-on-zha-e2201
sequence: sequence:
- wait_for_trigger: - wait_for_trigger:
- platform: event - platform: event
event_type: zha_event event_type: zha_event
event_data: event_data:
device_id: "{{ zha_remote }}" device_id: "{{ zha_controller }}"
command: "on" command: "on"
cluster_id: 6 cluster_id: 6
endpoint_id: 1 endpoint_id: 1
@@ -243,7 +356,7 @@ action:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- press-on-z2m - press-on-z2m-e2201
sequence: sequence:
- wait_for_trigger: - wait_for_trigger:
- platform: mqtt - platform: mqtt
@@ -257,28 +370,31 @@ action:
value_template: "{{ wait.trigger.idx is defined }}" value_template: "{{ wait.trigger.idx is defined }}"
then: !input on_double_press_action then: !input on_double_press_action
else: !input on_press_action else: !input on_press_action
default: !input on_press_action
else: !input on_press_action else: !input on_press_action
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- press-off-zha - press-off-zha-e2201
- press-off-z2m - press-off-z2m-e2201
- press-dots2-zha-e2213
- press-dots2-z2m-e2213
sequence: sequence:
- if: - if:
- condition: template - condition: template
value_template: "{{ off_double_press }}" value_template: "{{ off_double_press_exposed }}"
then: then:
- choose: - choose:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- press-off-zha - press-off-zha-e2201
sequence: sequence:
- wait_for_trigger: - wait_for_trigger:
- platform: event - platform: event
event_type: zha_event event_type: zha_event
event_data: event_data:
device_id: "{{ zha_remote }}" device_id: "{{ zha_controller }}"
command: "off" command: "off"
cluster_id: 6 cluster_id: 6
endpoint_id: 1 endpoint_id: 1
@@ -293,7 +409,7 @@ action:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- press-off-z2m - press-off-z2m-e2201
sequence: sequence:
- wait_for_trigger: - wait_for_trigger:
- platform: mqtt - platform: mqtt
@@ -307,12 +423,27 @@ action:
value_template: "{{ wait.trigger.idx is defined }}" value_template: "{{ wait.trigger.idx is defined }}"
then: !input off_double_press_action then: !input off_double_press_action
else: !input off_press_action else: !input off_press_action
default: !input off_press_action
else: !input off_press_action else: !input off_press_action
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- hold-on-zha - double-press-dots1-zha-e2213
- hold-on-z2m - double-press-dots1-z2m-e2213
sequence: !input on_double_press_action
- conditions:
- condition: trigger
id:
- double-press-dots2-zha-e2213
- double-press-dots2-z2m-e2213
sequence: !input off_double_press_action
- conditions:
- condition: trigger
id:
- hold-on-zha-e2201
- hold-on-z2m-e2201
- hold-dots1-zha-e2213
- hold-dots1-z2m-e2213
sequence: sequence:
- repeat: - repeat:
count: !input helper_max_loops count: !input helper_max_loops
@@ -324,13 +455,14 @@ action:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- hold-on-zha - hold-on-zha-e2201
- hold-dots1-zha-e2213
sequence: sequence:
- wait_for_trigger: - wait_for_trigger:
- platform: event - platform: event
event_type: zha_event event_type: zha_event
event_data: event_data:
device_id: "{{ zha_remote }}" device_id: "{{ zha_controller }}"
command: "stop_with_on_off" command: "stop_with_on_off"
cluster_id: 8 cluster_id: 8
endpoint_id: 1 endpoint_id: 1
@@ -345,12 +477,16 @@ action:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- hold-on-z2m - hold-on-z2m-e2201
- hold-dots1-z2m-e2213
sequence: sequence:
- wait_for_trigger: - wait_for_trigger:
- platform: mqtt - platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}" topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "brightness_stop" payload: "brightness_stop"
- platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "1_long_release"
timeout: timeout:
milliseconds: !input helper_hold_delay milliseconds: !input helper_hold_delay
continue_on_timeout: true continue_on_timeout: true
@@ -362,8 +498,10 @@ action:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- hold-off-zha - hold-off-zha-e2201
- hold-off-z2m - hold-off-z2m-e2201
- hold-dots2-zha-e2213
- hold-dots2-z2m-e2213
sequence: sequence:
- repeat: - repeat:
count: !input helper_max_loops count: !input helper_max_loops
@@ -375,13 +513,14 @@ action:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- hold-off-zha - hold-off-zha-e2201
- hold-dots2-zha-e2213
sequence: sequence:
- wait_for_trigger: - wait_for_trigger:
- platform: event - platform: event
event_type: zha_event event_type: zha_event
event_data: event_data:
device_id: "{{ zha_remote }}" device_id: "{{ zha_controller }}"
command: "stop_with_on_off" command: "stop_with_on_off"
cluster_id: 8 cluster_id: 8
endpoint_id: 1 endpoint_id: 1
@@ -396,12 +535,16 @@ action:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- hold-off-z2m - hold-off-z2m-e2201
- hold-dots2-z2m-e2213
sequence: sequence:
- wait_for_trigger: - wait_for_trigger:
- platform: mqtt - platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}" topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "brightness_stop" payload: "brightness_stop"
- platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "2_long_release"
timeout: timeout:
milliseconds: !input helper_hold_delay milliseconds: !input helper_hold_delay
continue_on_timeout: true continue_on_timeout: true

View File

@@ -1,6 +1,7 @@
blueprint: blueprint:
name: IKEA Rodret Dimmer Light Control (ZHA/Z2M) name: IKEA Rodret (E2201) or IKEA Somrig (E2213) Light control (ZHA/Z2M)
description: "## Control Light with IKEA RODRET Dimmer remote (v1.0) description: >
## Control a light with **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/)
@@ -10,31 +11,35 @@ blueprint:
Available controls: Available controls:
- Press the **on** button to turn on the light (Optional: set the target brightness - Press **on** (Rodret) or **1 dot** (Somrig) to turn on the light
by enabling **Helper - Force Brightness** and setting a **Helper - Brightness** value) (Optional: set the target brightness by enabling **Helper - Force Brightness** and setting a **Helper - Brightness** value)
- Press the **off** button to turn off the light - Press **off** (Rodret) or **2 dots** (Somrig) to turn off the light
- Press and hold the **on** button to increase the brightness - Hold **on** (Rodret) or **1 dot** button to increase the brightness
- Press and hold the **off** button to decrease the brightness down to 1% - Hold **off** (Rodret) or **2 dots** button to decrease the brightness down to 1%
"
domain: automation domain: automation
input: input:
remote_device: remote_device:
name: (ZHA) Remote name: (ZHA) Remote
description: IKEA remote to use. **_Choose if you are using ZHA._** description: >
**_Choose if you are using ZHA._** IKEA remote to use.
default: "" default: ""
selector: selector:
device: device:
filter: filter:
integration: zha - integration: zha
manufacturer: IKEA of Sweden manufacturer: IKEA of Sweden
model: RODRET Dimmer model: RODRET Dimmer
- integration: zha
manufacturer: IKEA of Sweden
model: SOMRIG shortcut button
multiple: false multiple: false
remote_name: remote_name:
name: (Zigbee2MQTT) Remote Name name: (Zigbee2MQTT) Remote Name
description: The name of the controller (e.g. IKEA Rodret). **_Choose if you are using Zigbee2MQTT._** description: >
**_Choose if you are using Zigbee2MQTT._** The name of the controller (e.g. IKEA Rodret).
default: "" default: ""
base_topic: base_topic:
name: (Zigbee2MQTT) Base mqtt topic name: (Zigbee2MQTT) Base mqtt topic
@@ -50,7 +55,7 @@ blueprint:
multiple: false multiple: false
helper_force_brightness: helper_force_brightness:
name: Helper - Force brightness name: Helper - Force brightness
description: Force the brightness to value below when light turns on. description: Force the brightness to **Helper - Brightness** value when light turns on.
default: false default: false
selector: selector:
boolean: {} boolean: {}
@@ -74,6 +79,7 @@ trigger_variables:
z2m_controller: !input remote_name z2m_controller: !input remote_name
zha_controller: !input remote_device zha_controller: !input remote_device
trigger: trigger:
# RODRET - E2201
- platform: event - platform: event
event_type: zha_event event_type: zha_event
event_data: event_data:
@@ -81,11 +87,11 @@ trigger:
command: "on" command: "on"
cluster_id: 6 cluster_id: 6
endpoint_id: 1 endpoint_id: 1
id: press-on-zha id: press-on-zha-e2201
- platform: mqtt - platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}" topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "on" payload: "on"
id: press-on-z2m id: press-on-z2m-e2201
- platform: event - platform: event
event_type: zha_event event_type: zha_event
event_data: event_data:
@@ -93,11 +99,11 @@ trigger:
command: "off" command: "off"
cluster_id: 6 cluster_id: 6
endpoint_id: 1 endpoint_id: 1
id: press-off-zha id: press-off-zha-e2201
- platform: mqtt - platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}" topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "off" payload: "off"
id: press-off-z2m id: press-off-z2m-e2201
- platform: event - platform: event
event_type: zha_event event_type: zha_event
event_data: event_data:
@@ -106,11 +112,11 @@ trigger:
cluster_id: 8 cluster_id: 8
endpoint_id: 1 endpoint_id: 1
args: [0, 83] args: [0, 83]
id: hold-on-zha id: hold-on-zha-e2201
- platform: mqtt - platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}" topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "brightness_move_up" payload: "brightness_move_up"
id: hold-on-z2m id: hold-on-z2m-e2201
- platform: event - platform: event
event_type: zha_event event_type: zha_event
event_data: event_data:
@@ -119,11 +125,11 @@ trigger:
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 id: hold-off-zha-e2201
- platform: mqtt - platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}" topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "brightness_move_down" payload: "brightness_move_down"
id: hold-off-z2m id: hold-off-z2m-e2201
- platform: event - platform: event
event_type: zha_event event_type: zha_event
event_data: event_data:
@@ -131,11 +137,117 @@ trigger:
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 id: release-zha-e2201
- platform: mqtt - platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}" topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "brightness_stop" payload: "brightness_stop"
id: release-z2m id: release-z2m-e2201
# SOMRIG - E2213
- platform: event
event_type: zha_event
event_data:
device_id: "{{ zha_controller }}"
command: "short_release"
cluster_id: 64640
endpoint_id: 1
args: [0]
id: press-dots1-zha-e2213
- platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "1_short_release"
id: press-dots1-z2m-e2213
- platform: event
event_type: zha_event
event_data:
device_id: "{{ zha_controller }}"
command: "short_release"
cluster_id: 64640
endpoint_id: 2
args: [0]
id: press-dots2-zha-e2213
- platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "2_short_release"
id: press-dots2-z2m-e2213
- platform: event
event_type: zha_event
event_data:
device_id: "{{ zha_controller }}"
command: "multi_press_complete"
cluster_id: 64640
endpoint_id: 1
args: [0, 2]
id: double-press-dots1-zha-e2213
- platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "1_double_press"
id: double-press-dots1-z2m-e2213
- platform: event
event_type: zha_event
event_data:
device_id: "{{ zha_controller }}"
command: "multi_press_complete"
cluster_id: 64640
endpoint_id: 2
args: [0, 2]
id: double-press-dots2-zha-e2213
- platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "2_double_press"
id: double-press-dots2-z2m-e2213
- platform: event
event_type: zha_event
event_data:
device_id: "{{ zha_controller }}"
command: "long_press"
cluster_id: 64640
endpoint_id: 1
args: [0]
id: hold-dots1-zha-e2213
- platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "1_long_press"
id: hold-dots1-z2m-e2213
- platform: event
event_type: zha_event
event_data:
device_id: "{{ zha_controller }}"
command: "long_press"
cluster_id: 64640
endpoint_id: 2
args: [0]
id: hold-dots2-zha-e2213
- platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "2_long_press"
id: hold-dots2-z2m-e2213
- platform: event
event_type: zha_event
event_data:
device_id: "{{ zha_controller }}"
command: "long_release"
cluster_id: 64640
endpoint_id: 1
args: [0]
id: release-hold-dots1-zha-e2213
- platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "1_long_release"
id: release-hold-dots1-z2m-e2213
- platform: event
event_type: zha_event
event_data:
device_id: "{{ zha_controller }}"
command: "long_release"
cluster_id: 64640
endpoint_id: 2
args: [0]
id: release-hold-dots2-zha-e2213
- platform: mqtt
topic: "{{ z2m_base_topic ~ '/' ~ z2m_controller ~ '/action' }}"
payload: "2_long_release"
id: release-hold-dots2-z2m-e2213
action: action:
- variables: - variables:
helper_force_brightness: !input helper_force_brightness helper_force_brightness: !input helper_force_brightness
@@ -146,8 +258,10 @@ action:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- press-on-zha - press-on-zha-e2201
- press-on-z2m - press-on-z2m-e2201
- press-dots1-zha-e2213
- press-dots1-z2m-e2213
sequence: sequence:
- choose: - choose:
- conditions: "{{ helper_force_brightness }}" - conditions: "{{ helper_force_brightness }}"
@@ -168,7 +282,9 @@ action:
- condition: trigger - condition: trigger
id: id:
- press-off-zha - press-off-zha
- press-off-z2m - press-off-z2m-e2201
- press-dots2-zha-e2213
- press-dots2-z2m-e2213
sequence: sequence:
- service: light.turn_off - service: light.turn_off
target: target:
@@ -178,15 +294,19 @@ action:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- hold-on-zha - hold-on-zha-e2201
- hold-on-z2m - hold-on-z2m-e2201
- hold-dots1-zha-e2213
- hold-dots1-z2m-e2213
sequence: sequence:
- repeat: - repeat:
while: while:
- condition: trigger - condition: trigger
id: id:
- hold-on-zha - hold-on-zha-e2201
- hold-on-z2m - hold-on-z2m-e2201
- hold-dots1-zha-e2213
- hold-dots1-z2m-e2213
sequence: sequence:
- parallel: - parallel:
- service: light.turn_on - service: light.turn_on
@@ -198,8 +318,10 @@ action:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: id:
- hold-off-zha - hold-off-zha-e2201
- hold-off-z2m - hold-off-z2m-e2201
- hold-dots2-zha-e2213
- hold-dots2-z2m-e2213
sequence: sequence:
- repeat: - repeat:
while: while: