After several weeks of installing 1-4 switches at a time, I’ve now converted all my switches to smart switches with >60 being red series Inovelli switches (mix of dimmer and on/off). They switches have been great but one issue that is affecting the WAF is inadvertently pressing the config button when trying to turn on a switch. I setup a quick notification automation for me to track it and there are >10 presses of a config button per day followed by pressing up. It may entirely be my family and nothing to do with the design, but I was trying to create a workaround and needed some assistance.
My goal is to create a single Home Assistant automation that makes all single presses of the config button press the up button 1x. I do not want to have to create and maintain a separate automation for each switch. My intention is to use the event trigger of the config button and then use that information to turn on the switch. One issue seems to be that the entity ID isn’t passed in the event data. Thus, I was trying to use zwave_js.set_value using the Object ID, but have not been sucessful so far.
I’ve tried a ton of permutations in the Debugger to send the zwave_js.set_value and I just can’t get it to work. It looks like it may need to send the property as 002 instead of 2, but I can’t sort out how to make that happen to know if that fixes my issue.
Any thoughts on how to do this? Cross posted in Inovelli forums as well.
Sample zwave_js_value_notification of the config button being pressed 1x:
{
"event_type": "zwave_js_value_notification",
"data": {
"domain": "zwave_js",
"node_id": 67,
"home_id": 3280068956,
"endpoint": 0,
"device_id": "02204933b2e6cb4dc65d81121aa9b262",
"command_class": 91,
"command_class_name": "Central Scene",
"label": "Scene 003",
"property": "scene",
"property_name": "scene",
"property_key": "003",
"property_key_name": "003",
"value": "KeyPressed",
"value_raw": 0
},
"origin": "LOCAL",
"time_fired": "2021-11-02T00:59:55.755735+00:00",
"context": {
"id": "0a9b8b691f98eabb114df8ab095819b2",
"parent_id": null,
"user_id": null
}
}
Sample zwave_js_value_notification of the up button being pressed 1x:
{
"event_type": "zwave_js_value_notification",
"data": {
"domain": "zwave_js",
"node_id": 67,
"home_id": 3280068956,
"endpoint": 0,
"device_id": "02204933b2e6cb4dc65d81121aa9b262",
"command_class": 91,
"command_class_name": "Central Scene",
"label": "Scene 002",
"property": "scene",
"property_name": "scene",
"property_key": "002",
"property_key_name": "002",
"value": "KeyPressed",
"value_raw": 0
},
"origin": "LOCAL",
"time_fired": "2021-11-02T01:38:26.805004+00:00",
"context": {
"id": "a958ccc6a818cba38cf25efb6d7d9374",
"parent_id": null,
"user_id": null
}
}
Automation Attempt that isn’t working:
alias: 'Config Button: Single Tap: Turn On'
description: ''
trigger:
- platform: event
event_type: zwave_js_value_notification
event_data:
domain: zwave_js
property: scene
property_key: '003'
value: KeyPressed
condition: []
action:
- service: zwave_js.set_value
target:
device_id: '{{ trigger.event.data.device_id }}'
data:
property_key: '002'
value: KeyPressed
command_class: '91'
property: scene
mode: queued
max: 100
Error in HA Logs:
2021-11-01 21:27:00 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [2673116280] Error handling message: Unknown error
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 525, in handle_execute_script
await script_obj.async_run(msg.get("variables"), context=context)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1219, in async_run
await asyncio.shield(run.async_run())
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 353, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 371, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 571, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1491, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1526, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/components/zwave_js/services.py", line 439, in async_set_value
success = await node.async_set_value(
File "/usr/local/lib/python3.9/site-packages/zwave_js_server/model/node.py", line 423, in async_set_value
raise NotFoundError(f"Value {val} not found on node {self}")
zwave_js_server.exceptions.NotFoundError: Value 67-91-0-scene-2 not found on node Node(node_id=67)