I have a couple of Hubitat Hubs as the ZWave Hubs for the environment, they interact with Home Assistant using the Maker API. HA is doing all automations.
I’m trying to figure out how to use the scene controller buttons on the Zen32’s to trigger HA automations.
When a button (say button 4) on a Zen32 is pressed the following is sent by the Maker API to HA:
POST / HTTP/1.1
Accept: */*
Content-Length: 171
Content-Type: application/json
Host: 10.26.10.11:18123
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/11.0.16.1)
Accept-Encoding: gzip,deflate
{"content":{"name":"pushed","value":"4","displayName":"Living Room Lights Fan Controller","deviceId":"10","descriptionText":null,"unit":null,"type":"digital","data":null}}
This sets the HA sensor sensor.living_room_lights_fan_controller_pushed
to 4
. Which was seemingly promising, but then I realized that the value just stays at 4, so if someone presses that button again any automations that are triggered by that sensor value won’t see the new press since the value doesn’t change.
The sensor sensor.living_room_lights_fan_controller_last_update_time
gets updated each time any of the other sensors
gets updated, so I was thinking I could use this to see what happened, but there are other sensors and button presses that could be happening: “released”, “doublepress” etc. and if nothing changes then I won’t know which one triggered the last_update_time
trigger.
Any ideas?