Updated 2021-12-17 - Since OZW is depreciated and discussions in thread have already switch to Z-Wave JS - I’ve switched the blueprint to Z-Wave JS. It is tested and working with Home Assistant 2021.12
Use this blueprint to configure actions when a button is pressed, held and (or) released
blueprint:
name: Aeotec Nano-Mote Quad
description: Create automations for the Aeotec ZWA003 Nano-Mote Quad
domain: automation
input:
nanomote_device:
name: NanoMote Device
description: A Nano-Mote device.
selector:
device:
integration: zwave_js
manufacturer: Aeotec Ltd.
model: ZWA003
button_1_pressed:
name: Button 1 Pressed
description: Actions to run when button 1 is pressed.
default: []
selector:
action:
button_1_held:
name: Button 1 Held Down
description: Actions to run when button 1 is held down.
default: []
selector:
action:
button_1_released:
name: Button 1 Released
description: Actions to run when button 1 is released.
default: []
selector:
action:
button_2_pressed:
name: Button 2 Pressed
description: Actions to run when button 2 is pressed.
default: []
selector:
action:
button_2_held:
name: Button 2 Held Down
description: Actions to run when button 2 is held down.
default: []
selector:
action:
button_2_released:
name: Button 2 Released
description: Actions to run when button 2 is released.
default: []
selector:
action:
button_3_pressed:
name: Button 3 Pressed
description: Actions to run when button 3 is pressed.
default: []
selector:
action:
button_3_held:
name: Button 3 Held Down
description: Actions to run when button 3 is held down.
default: []
selector:
action:
button_3_released:
name: Button 3 Released
description: Actions to run when button 3 is released.
default: []
selector:
action:
button_4_pressed:
name: Button 4 Pressed
description: Actions to run when button 4 is pressed.
default: []
selector:
action:
button_4_held:
name: Button 4 Held Down
description: Actions to run when button 4 is held down.
default: []
selector:
action:
button_4_released:
name: Button 4 Released
description: Actions to run when button 4 is released.
default: []
selector:
action:
mode: single
max_exceeded: silent
trigger:
- platform: event
event_type: zwave_js_value_notification
event_data:
command_class_name: Central Scene
device_id: !input nanomote_device
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 button_1_pressed
- conditions: "{{ attribute_id == 'KeyHeldDown' }}"
sequence: !input button_1_held
- conditions: "{{ attribute_id == 'KeyReleased' }}"
sequence: !input button_1_released
- conditions: "{{ scene_id == 'Scene 002' }}"
sequence:
- choose:
- conditions: "{{ attribute_id == 'KeyPressed' }}"
sequence: !input button_2_pressed
- conditions: "{{ attribute_id == 'KeyHeldDown' }}"
sequence: !input button_2_held
- conditions: "{{ attribute_id == 'KeyReleased' }}"
sequence: !input button_2_released
- conditions: "{{ scene_id == 'Scene 003' }}"
sequence:
- choose:
- conditions: "{{ attribute_id == 'KeyPressed' }}"
sequence: !input button_3_pressed
- conditions: "{{ attribute_id == 'KeyHeldDown' }}"
sequence: !input button_3_held
- conditions: "{{ attribute_id == 'KeyReleased' }}"
sequence: !input button_3_released
- conditions: "{{ scene_id == 'Scene 004' }}"
sequence:
- choose:
- conditions: "{{ attribute_id == 'KeyPressed' }}"
sequence: !input button_4_pressed
- conditions: "{{ attribute_id == 'KeyHeldDown' }}"
sequence: !input button_4_held
- conditions: "{{ attribute_id == 'KeyReleased' }}"
sequence: !input button_4_released
Someone else used your blueprint as the basis for another blueprint. In it, I noticed this variable definition:
device_id: !input aeotec_nanomote
However, I don’t see device_id used in the automation. Is that something left over from this blueprint’s early development or is it something that will be used in a future version? Or does it serve as a placeholder because the selector for the Nanomote serves as a means of revealing the node’s id (which the user must enter manually)? Or some other reason?
So right now, it’s just a place holder. Entering the node_id manually is the workaround – I’m hoping that in the future, it will be possible to obtain the node_id from the device selector.
I chose the device selector over the entity selector (which could provide the node_id) for two main reasons
Some Z-Wave devices, such as this remote do not create an entity to trigger scene events from
I had originally tried using the entity selector for this generic inovelli blueprint, however I could not narrow the list enough, to only included the correct scene enabled switches.
I am open to any constructive criticism you may have on this decision, or suggestions for improvement.
I have no suggestions regarding device_id and defer to your decision. I was in the process of streamlining the template and wondered why device_id wasn’t used.
I don’t have the appropriate gadgetry to test this but I believe it should work as well as the original version.
All four choices in choose had two common conditions so I moved them out of choose and to a separate condition. If it evaluates to false then there’s no reason for the action to execute choose. The template also employs the new shorthand notation for Template Conditions.
There was a format error (my fault) when I copied the file.
@123 - I also made some minor changes. I had initially thought the everything was working after simply reloading the automations, however after a complete restart of Home Assistant, my automations built on this blueprint no longer worked.
For some reason, it does not like the condition: template inside of the action. There are no errors, it just does not make it to the sequence. I was able to still follow your lead and remove the repetitive code. Just with a slightly different approach.
Basically, I added the scene_value_id to the event_data trigger and moved the remaining condition to match the node_id, to before the action.
It should work equally well the way you changed it (moved the condition completely out of the action).
NOTE
If you modify a blueprint, you minimally have to execute Reload Automations to make Home Assistant use the revised version (restarting Home Assistant will, of course, do the same).
Awesome thank you! I’m looking forward for my own switch over to Z-Wave JS – All these exciting things happening, and of course I’m busy with other things this week.
Thanks to everyone who has worked on this so far! I am trying to port this code over to use the older Minimotes with zwave_js, but haven’t been able to get it working yet.
The Minimotes send out an event_type: zwave_js_event, but of the data type: “value_notification” and scene_id values of 1, 3, 5, or 7 corresponding to the four buttons. (Odd 1, 3, 5, 7 for short press, even 2, 4, 6, 8 for long press.)
I can get everything working if I explicitly list the node_id, type: value_notification, and value, but not in the blueprints format.
Hello,
I hope you could help me. i have just included this nanomote quad and i only get these entities…
Maybe you could assist me? i am using z-wave js using z-wave js to mqtt as bridge.~
Has anyone been able to create a zwavejs blueprint for the nanomote quad? If so would they be willing to share it on the forum. I wish I had the ability to create one but its just a bit outside my ability. Thanks!