Fix aqara switches

This commit is contained in:
Georgi Gardev
2022-12-01 16:02:00 +02:00
parent d58a40a0c2
commit a80c998333
7 changed files with 9 additions and 8 deletions
+3 -3
View File
@@ -16,11 +16,11 @@ trigger:
action: action:
- choose: - choose:
- conditions: "{{ trigger.payload_json.click == 'single' }}" - conditions: "{{ trigger.payload == 'single' }}"
sequence: !input click sequence: !input click
- conditions: "{{ trigger.payload_json.click == 'double' }}" - conditions: "{{ trigger.payload == 'double' }}"
sequence: !input double_click sequence: !input double_click
- conditions: "{{ trigger.payload_json.action == 'hold' }}" - conditions: "{{ trigger.payload == 'hold' }}"
sequence: !input hold sequence: !input hold
@@ -26,7 +26,7 @@ automation:
use_blueprint: use_blueprint:
path: aqara_switch.yaml path: aqara_switch.yaml
input: input:
z2m_topic: "z2m_deconz/bathroom_switch" z2m_topic: "z2m_deconz/bathroom_switch/action"
click: click:
- service: media_player.volume_set - service: media_player.volume_set
entity_id: media_player.bathroom entity_id: media_player.bathroom
+1 -1
View File
@@ -18,7 +18,7 @@ automation:
use_blueprint: use_blueprint:
path: aqara_switch.yaml path: aqara_switch.yaml
input: input:
z2m_topic: "z2m_deconz/bedside_switch" z2m_topic: "z2m_deconz/bedside_switch/action"
click: click:
- service: light.toggle - service: light.toggle
data_template: data_template:
@@ -19,7 +19,7 @@ automation:
use_blueprint: use_blueprint:
path: aqara_switch.yaml path: aqara_switch.yaml
input: input:
z2m_topic: "z2m_deconz/bedroom_wall_switch" z2m_topic: "z2m_deconz/bedroom_wall_switch/action"
click: click:
- service: light.toggle - service: light.toggle
data_template: data_template:
@@ -23,7 +23,7 @@
# use_blueprint: # use_blueprint:
# path: aqara_switch.yaml # path: aqara_switch.yaml
# input: # input:
# z2m_topic: "z2m_deconz/bedroom_wall_switch" # z2m_topic: "z2m_deconz/bedroom_wall_switch/action"
# click: # click:
# - choose: # - choose:
# - conditions: # - conditions:
@@ -19,7 +19,7 @@ automation:
use_blueprint: use_blueprint:
path: aqara_switch.yaml path: aqara_switch.yaml
input: input:
z2m_topic: "z2m_deconz/desk_switch" z2m_topic: "z2m_deconz/desk_switch/action"
click: click:
- service: light.toggle - service: light.toggle
data_template: data_template:
@@ -11,6 +11,7 @@ automation:
mode: parallel mode: parallel
trigger: trigger:
platform: state platform: state
to: "on"
entity_id: entity_id:
- light.living_room_main - light.living_room_main
- light.pc - light.pc