Skip to content

Instantly share code, notes, and snippets.

@compujunk
Created October 15, 2021 14:16
Show Gist options
  • Save compujunk/3ec2e5be0a9dd55e37c57af51a55ff5b to your computer and use it in GitHub Desktop.
Save compujunk/3ec2e5be0a9dd55e37c57af51a55ff5b to your computer and use it in GitHub Desktop.
This Blueprint is for the _TZ3000_axpdxqgu TS0041 Switch paired to the ZHA integration.
The Zigbee ID for this button is _TZ3000_axpdxqgu TS0041
It supports 3 functions:
Single press
Double press
Long press
The blueprint is heavily based on thedudeabides
blueprint:
name: ZHA - _TZ3000_axpdxqgu TS0041 Switch
description: Automate your TS0041 Wireless Switch using ZHA events.
domain: automation
input:
ts0041_switch:
name: _TZ3000_axpdxqgu TS0041 Switch
description: _TZ3000_axpdxqgu TS0041 Switch to use
selector:
device:
integration: zha
manufacturer: _TZ3000_axpdxqgu
model: TS0041
button_single_press:
name: Single Press
description: Action to run on single press
default: []
selector:
action: {}
button_double_press:
name: Double Press
description: Action to run on double press
default: []
selector:
action: {}
button_long_press:
name: Long Press
description: Action to run when button is long pressed (held down)
default: []
selector:
action: {}
# source_url:
mode: restart
max_exceeded: silent
trigger:
- platform: event
event_type: zha_event
event_data:
device_id: !input "ts0041_switch"
action:
- variables:
command: "{{ trigger.event.data.command }}"
- choose:
- conditions:
- "{{ command == 'remote_button_short_press' }}"
sequence: !input "button_single_press"
- conditions:
- "{{ command == 'remote_button_double_press' }}"
sequence: !input "button_double_press"
- conditions:
- "{{ command == 'remote_button_short_press' }}"
sequence: !input "button_long_press"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment