I’d like to lie to Home Assistant.
I received a Zooz Z-Wave Scene Controller which has 5 buttons on it. It’s installed and is communicating with a Hubitat, which then passes the device’s various entities/states to HA.
One of those entities is called “Pushed” which reports a number, 1 through 5, of the last button that was pressed. I can use changes to this entity to trigger automations. The problem is that it states the last button pressed, which means that if you press that button again, the state technically doesn’t change in HA and thus automations won’t be triggered.
I’ve played around with the state in the Developers Tools and found that if I change the state and then press the button again, it does update in HA again, even though the state isn’t technically changing in Hubitat.
I’d like to find out how to override the state. My thought is that, upon an entity entering some state, my automation can run normally, but the final step of that automation can be to set the state of the entity to anything else. It doesn’t need to actually affect the device, and it doesn’t even need to be a valid state. In this case, manually setting the “Pushed” state to 0 (which is not a valid state for that entity) allows automations to run if the button is pressed a second time.
How can this be done? Is there a better way to accomplish what I’m trying to do here? Any suggestions are welcome.
Thanks!