Skip to content

Instantly share code, notes, and snippets.

@ChillZwix
Last active September 23, 2023 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChillZwix/2584dee69eb4fec25d1718fbd2585ecb to your computer and use it in GitHub Desktop.
Save ChillZwix/2584dee69eb4fec25d1718fbd2585ecb to your computer and use it in GitHub Desktop.
blueprint:
name: Z2M - Tuya 6 Gang Remote
description: 'Control anything with a Tuya 6 Gang Remote. (SS9600ZB)
Inspired by the blueprint of @seamus65 (https://community.home-assistant.io/t/tuya-4-gang-portable-remote/406865)
You can set functions for a single press and double press of the six buttons.
I have skipped adding the hold command, because it just keep setting the remote in pairing mode, so dont hold any button for to long.'
domain: automation
input:
remote:
name: Remote
description: Tuya 6 Gang Remote to use
selector:
entity:
domain: sensor
integration: mqtt
multiple: false
button_1_single:
name: Button 1 - single click
description: Action to run on single click of button 1
default: []
selector:
action: {}
button_1_double:
name: Button 1 - double click
description: Action to run on double click of button 1
default: []
selector:
action: {}
button_2_single:
name: Button 2 - single click
description: Action to run on single click of button 2
default: []
selector:
action: {}
button_2_double:
name: Button 2 - double click
description: Action to run on double click of button 2
default: []
selector:
action: {}
button_3_single:
name: Button 3 - single click
description: Action to run on single click of button 3
default: []
selector:
action: {}
button_3_double:
name: Button 3 - double click
description: Action to run on double click of button 3
default: []
selector:
action: {}
button_4_single:
name: Button 4 - single click
description: Action to run on single click of button 4
default: []
selector:
action: {}
button_4_double:
name: Button 4 - double click
description: Action to run on double click of button 4
default: []
selector:
action: {}
button_5_single:
name: Button 5 - single click
description: Action to run on single click of button 5
default: []
selector:
action: {}
button_5_double:
name: Button 5 - double click
description: Action to run on double click of button 5
default: []
selector:
action: {}
button_6_single:
name: Button 6 - single click
description: Action to run on single click of button 6
default: []
selector:
action: {}
button_6_double:
name: Button 6 - double click
description: Action to run on double click of button 6
default: []
selector:
action: {}
source_url: https://gist.github.com/ChillZwix/2584dee69eb4fec25d1718fbd2585ecb
mode: parallel
max_exceeded: silent
trigger:
- platform: state
entity_id: !input remote
variables:
command: "{{ trigger.to_state.state }}"
condition:
- condition: template
value_template: "{{ command != ''}}"
action:
- choose:
- conditions:
- '{{ command == ''1_single'' }}'
sequence: !input button_1_single
- conditions:
- '{{ command == ''2_single'' }}'
sequence: !input button_2_single
- conditions:
- '{{ command == ''3_single'' }}'
sequence: !input button_3_single
- conditions:
- '{{ command == ''4_single'' }}'
sequence: !input button_4_single
- conditions:
- '{{ command == ''5_single'' }}'
sequence: !input button_5_single
- conditions:
- '{{ command == ''6_single'' }}'
sequence: !input button_6_single
- conditions:
- '{{ command == ''1_double'' }}'
sequence: !input button_1_double
- conditions:
- '{{ command == ''2_double'' }}'
sequence: !input button_2_double
- conditions:
- '{{ command == ''3_double'' }}'
sequence: !input button_3_double
- conditions:
- '{{ command == ''4_double'' }}'
sequence: !input button_4_double
- conditions:
- '{{ command == ''5_double'' }}'
sequence: !input button_5_double
- conditions:
- '{{ command == ''6_double'' }}'
sequence: !input button_6_double
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment