Skip to content

Instantly share code, notes, and snippets.

@flyingsubs
Created August 11, 2022 02:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save flyingsubs/35246fa2935f105f133385c6cf41f6fa to your computer and use it in GitHub Desktop.
Save flyingsubs/35246fa2935f105f133385c6cf41f6fa to your computer and use it in GitHub Desktop.
blueprint tutorial for Zen34
blueprint:
name: Zooz ZEN34
description: Automations helper for the Zooz ZEN34 S2 Switch using the Zwave
JS integration.
domain: automation
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: 'Action to run on upper paddle single tap. Default: Turn
on switch load.'
default: []
selector:
action: {}
paddle_up_2x:
name: Top Paddle 2x
description: Action to run on upper paddle double tap.
default: []
selector:
action: {}
paddle_up_3x:
name: Top Paddle 3x
description: 'Action to run on upper paddle triple tap. Default: Enter
inclusion/pairing mode.'
default: []
selector:
action: {}
paddle_up_4x:
name: Top Paddle 4x
description: Action to run on upper paddle quadruple tap.
default: []
selector:
action: {}
paddle_up_5x:
name: Top Paddle 5x
description: Action to run on upper paddle quintuple tap.
default: []
selector:
action: {}
paddle_up_hold:
name: Top Paddle Hold
description: 'Action to run on upper paddle press-and-hold.'
default: []
selector:
action: {}
paddle_up_release:
name: Top Paddle Release
description: Action to run on upper paddle release.
default: []
selector:
action: {}
paddle_down_1x:
name: Lower Paddle 1x
description: 'Action to run on lower paddle single tap. Default: Turn
off switch load.'
default: []
selector:
action: {}
paddle_down_2x:
name: Lower Paddle 2x
description: Action to run on lower paddle double tap.
default: []
selector:
action: {}
paddle_down_3x:
name: Lower Paddle 3x
description: 'Action to run on lower paddle triple tap. Default: Enter
exclusion/un-pairing mode.'
default: []
selector:
action: {}
paddle_down_4x:
name: Lower Paddle 4x
description: Action to run on lower paddle quadruple tap.
default: []
selector:
action: {}
paddle_down_5x:
name: Lower Paddle 5x
description: Action to run on lower paddle quintuple tap.
default: []
selector:
action: {}
paddle_down_hold:
name: Bottom Paddle Hold
description: 'Action to run on lower paddle press-and-hold.'
default: []
selector:
action: {}
paddle_down_release:
name: Bottom Paddle Release
description: Action to run on lower paddle double tap.
default: []
selector:
action: {}
# source_url:
mode: single
max_exceeded: silent
trigger:
- platform: event
event_type: zwave_js_value_notification
event_data:
command_class_name: Central Scene
device_id: !input zooz_zen34
action:
- variables:
scene_id: '{{ trigger.event.data.label }}'
attribute_id: '{{ trigger.event.data.value }}'
- choose:
- conditions: '{{ scene_id == ''Scene 001'' }}'
sequence:
- choose:
- conditions: '{{ attribute_id == ''KeyPressed'' }}'
sequence: !input paddle_up_1x
- conditions: '{{ attribute_id == ''KeyPressed2x'' }}'
sequence: !input paddle_up_2x
- conditions: '{{ attribute_id == ''KeyPressed3x'' }}'
sequence: !input paddle_up_3x
- conditions: '{{ attribute_id == ''KeyPressed4x'' }}'
sequence: !input paddle_up_4x
- conditions: '{{ attribute_id == ''KeyPressed5x'' }}'
sequence: !input paddle_up_5x
- conditions: '{{ attribute_id == ''KeyReleased'' }}'
sequence: !input paddle_up_release
- conditions: '{{ attribute_id == ''KeyHeldDown'' }}'
sequence: !input paddle_up_hold
- conditions: '{{ scene_id == ''Scene 002'' }}'
sequence:
- choose:
- conditions: '{{ attribute_id == ''KeyPressed'' }}'
sequence: !input paddle_down_1x
- conditions: '{{ attribute_id == ''KeyPressed2x'' }}'
sequence: !input paddle_down_2x
- conditions: '{{ attribute_id == ''KeyPressed3x'' }}'
sequence: !input paddle_down_3x
- conditions: '{{ attribute_id == ''KeyPressed4x'' }}'
sequence: !input paddle_down_4x
- conditions: '{{ attribute_id == ''KeyPressed5x'' }}'
sequence: !input paddle_down_5x
- conditions: '{{ attribute_id == ''KeyReleased'' }}'
sequence: !input paddle_down_release
- conditions: '{{ attribute_id == ''KeyHeldDown'' }}'
sequence: !input paddle_down_hold
@justinsanker
Copy link

justinsanker commented Nov 21, 2022

Thank you, thank you, thank you! This one actually works! The one in the community connects the "hold up" and "hold down" to dimming a dimmer. Pretty cool, but not what I was looking for. This one works where you can assign a scene or device to hold up and hold down.

One day I will figure out how to write these myself but this got me over the hump with the Zen34. I have 2 Zen34s now. One connected to HA and one to Smartthings. The one on HA is a faster automation so I'll be converting the other one to HA too! Eventually I'm trying to decommission my Smartthings but that's a slow process of excluding/including and setting up automations like I've done with the Zen34.

@flyingsubs
Copy link
Author

You are so welcome!! I adapted this from another blueprint and was able to figure it out. This works a lot better than my previous solution. I would love at some point to see if it makes sense to write one giant blueprint for all Zooz products.

@blamaz
Copy link

blamaz commented Sep 9, 2023

Hi,
A giant blueprint would be awesome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment