Skip to content

Instantly share code, notes, and snippets.

@cfg
Forked from computergreek/zen34.yaml
Last active July 25, 2024 19:03
Show Gist options
  • Save cfg/217ca3529fdb3d07c1d59a2267d986df to your computer and use it in GitHub Desktop.
Save cfg/217ca3529fdb3d07c1d59a2267d986df to your computer and use it in GitHub Desktop.
Generic entity blueprint tutorial for Zen34
blueprint:
name: Zooz ZEN34 Blueprint for generic entities. Does not support brightness.
description: Control a device with single-tap and double-tap
# reference: https://gist.github.com/flyingsubs/35246fa2935f105f133385c6cf41f6fa
# reference: https://gist.github.com/computergreek/847ad5194168cf3f26a0c908acc9431c
# reference: https://youtu.be/L-bcabdaMxE
# reference: https://chat.openai.com/share/299064bf-56bf-4bdb-a12b-3b474d8fec65
domain: automation
author: cfg
input:
zooz_zen34:
name: Zooz ZEN34
description: The ZEN34 Switch to interact with.
selector:
device:
integration: zwave_js
manufacturer: Zooz
model: ZEN34
multiple: false
paddle_up_1x:
name: Top Paddle 1x
description: Single tap action to run the top paddle.
default: []
selector:
action: {}
paddle_up_2x:
name: Top Paddle 2x
description: Double tap action to run the top paddle.
default: []
selector:
action: {}
paddle_up_3x:
name: Top Paddle 3x
description: Triple tap action to run the top paddle.
default: []
selector:
action: {}
paddle_up_4x:
name: Top Paddle 4x
description: Quadruple tap action to run the top paddle.
default: []
selector:
action: {}
paddle_up_5x:
name: Top Paddle 5x
description: Quintuple tap action to run the top paddle.
default: []
selector:
action: {}
paddle_down_1x:
name: Bottom Paddle 1x
description: Single tap action to run the bottom paddle.
default: []
selector:
action: {}
paddle_down_2x:
name: Bottom Paddle 2x
description: Double tap action to run the bottom paddle.
default: []
selector:
action: {}
paddle_down_3x:
name: Bottom Paddle 3x
description: Triple tap action to run the bottom paddle.
default: []
selector:
action: {}
paddle_down_4x:
name: Bottom Paddle 4x
description: Quadruple tap action to run the bottom paddle.
default: []
selector:
action: {}
paddle_down_5x:
name: Bottom Paddle 5x
description: Quintuple tap action to run the bottom paddle.
default: []
selector:
action: {}
trigger:
- platform: event
event_type: zwave_js_value_notification
event_data:
device_id: !input zooz_zen34
label: Scene 001
value: KeyPressed
id: paddle_up_1x
- platform: event
event_type: zwave_js_value_notification
event_data:
device_id: !input zooz_zen34
label: Scene 001
value: KeyPressed2x
id: paddle_up_2x
- platform: event
event_type: zwave_js_value_notification
event_data:
device_id: !input zooz_zen34
label: Scene 001
value: KeyPressed3x
id: paddle_up_3x
- platform: event
event_type: zwave_js_value_notification
event_data:
device_id: !input zooz_zen34
label: Scene 001
value: KeyPressed4x
id: paddle_up_4x
- platform: event
event_type: zwave_js_value_notification
event_data:
device_id: !input zooz_zen34
label: Scene 001
value: KeyPressed5x
id: paddle_up_5x
- platform: event
event_type: zwave_js_value_notification
event_data:
device_id: !input zooz_zen34
label: Scene 001
value: KeyHeldDown
id: paddle_up_hold
- platform: event
event_type: zwave_js_value_notification
event_data:
device_id: !input zooz_zen34
label: Scene 001
value: KeyReleased
id: paddle_up_release
- platform: event
event_type: zwave_js_value_notification
event_data:
device_id: !input zooz_zen34
label: Scene 002
value: KeyPressed
id: paddle_down_1x
- platform: event
event_type: zwave_js_value_notification
event_data:
device_id: !input zooz_zen34
label: Scene 002
value: KeyPressed2x
id: paddle_down_2x
- platform: event
event_type: zwave_js_value_notification
event_data:
device_id: !input zooz_zen34
label: Scene 002
value: KeyPressed3x
id: paddle_down_3x
- platform: event
event_type: zwave_js_value_notification
event_data:
device_id: !input zooz_zen34
label: Scene 002
value: KeyPressed4x
id: paddle_down_4x
- platform: event
event_type: zwave_js_value_notification
event_data:
device_id: !input zooz_zen34
label: Scene 002
value: KeyPressed5x
id: paddle_down_5x
- platform: event
event_type: zwave_js_value_notification
event_data:
device_id: !input zooz_zen34
label: Scene 002
value: KeyHeldDown
id: paddle_down_hold
- platform: event
event_type: zwave_js_value_notification
event_data:
device_id: !input zooz_zen34
label: Scene 002
value: KeyReleased
id: paddle_down_release
condition: []
action:
- choose:
- conditions: "{{ 'paddle_up_1x' in trigger.id }}"
sequence: !input "paddle_up_1x"
- conditions: "{{ 'paddle_up_2x' in trigger.id }}"
sequence: !input "paddle_up_2x"
- conditions: "{{ 'paddle_up_3x' in trigger.id }}"
sequence: !input "paddle_up_3x"
- conditions: "{{ 'paddle_up_4x' in trigger.id }}"
sequence: !input "paddle_up_4x"
- conditions: "{{ 'paddle_up_5x' in trigger.id }}"
sequence: !input "paddle_up_5x"
- conditions: "{{ 'paddle_down_1x' in trigger.id }}"
sequence: !input "paddle_down_1x"
- conditions: "{{ 'paddle_down_2x' in trigger.id }}"
sequence: !input "paddle_down_2x"
- conditions: "{{ 'paddle_down_3x' in trigger.id }}"
sequence: !input "paddle_down_3x"
- conditions: "{{ 'paddle_down_4x' in trigger.id }}"
sequence: !input "paddle_down_4x"
- conditions: "{{ 'paddle_down_5x' in trigger.id }}"
sequence: !input "paddle_down_5x"
default: []
mode: restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment