Skip to content

Instantly share code, notes, and snippets.

@konecnyna
Created July 24, 2023 17:32
Show Gist options
  • Save konecnyna/697f4893e66e9093fa7e0f5188652261 to your computer and use it in GitHub Desktop.
Save konecnyna/697f4893e66e9093fa7e0f5188652261 to your computer and use it in GitHub Desktop.
alias: Scene Switch
description: Handle all automations related to scene switch
trigger:
- platform: event
id: btn_1_press
event_type: zha_event
event_data:
device_id: 65ac534f2e5b9f40cfff355a30b814df
endpoint_id: 1
cluster_id: 6
command: remote_button_short_press
alias: Button 1 press
enabled: true
- platform: event
id: btn_1_double_press
event_type: zha_event
event_data:
device_id: 65ac534f2e5b9f40cfff355a30b814df
endpoint_id: 1
cluster_id: 6
command: remote_button_double_press
alias: Button 1 double press
- platform: event
id: btn_1_long_press
event_type: zha_event
event_data:
device_id: 65ac534f2e5b9f40cfff355a30b814df
endpoint_id: 1
cluster_id: 6
command: remote_button_long_press
alias: Button 1 long press
- platform: event
id: btn_2_press
event_type: zha_event
event_data:
device_ieee: 70:ac:08:ff:fe:1d:9b:f4
endpoint_id: 2
cluster_id: 6
command: remote_button_short_press
alias: Button 2 press
- platform: event
id: btn_2_double_press
event_type: zha_event
event_data:
device_id: 65ac534f2e5b9f40cfff355a30b814df
endpoint_id: 2
cluster_id: 6
command: remote_button_double_press
alias: Button 2 double press
- platform: event
id: btn_2_long_press
event_type: zha_event
event_data:
device_id: 65ac534f2e5b9f40cfff355a30b814df
endpoint_id: 2
cluster_id: 6
command: remote_button_long_press
alias: Button 2 long press
enabled: true
- platform: event
id: btn_3_press
event_type: zha_event
event_data:
device_id: 65ac534f2e5b9f40cfff355a30b814df
endpoint_id: 3
cluster_id: 6
alias: Button 3 press
- platform: event
id: btn_3_double_press
event_type: zha_event
event_data:
device_id: 65ac534f2e5b9f40cfff355a30b814df
endpoint_id: 3
cluster_id: 6
command: remote_button_double_press
alias: Button 3 double press
- platform: event
id: btn_3_long_press
event_type: zha_event
event_data:
device_id: 65ac534f2e5b9f40cfff355a30b814df
endpoint_id: 3
cluster_id: 6
command: remote_button_long_press
alias: Button 3 long press
enabled: true
- platform: event
id: btn_4_press
event_type: zha_event
event_data:
device_id: 65ac534f2e5b9f40cfff355a30b814df
endpoint_id: 4
cluster_id: 6
command: remote_button_short_press
alias: Button 4 press
- platform: event
id: btn_4_double_press
event_type: zha_event
event_data:
device_id: 65ac534f2e5b9f40cfff355a30b814df
endpoint_id: 4
cluster_id: 6
command: remote_button_double_press
alias: Button 4 double press
- platform: event
id: btn_4_long_press
event_type: zha_event
event_data:
device_id: 65ac534f2e5b9f40cfff355a30b814df
endpoint_id: 4
cluster_id: 6
command: remote_button_long_press
alias: Button 4 long press
enabled: true
- platform: event
event_type: zha_event
event_data: {}
alias: Test button trigger
enabled: false
id: asdasdas
condition: []
action:
- service: script.turn_on
data_template:
variables:
button_event: "{{ trigger.id }}"
target:
entity_id: script.scene_button_fucntions
mode: restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment