Since @brianspranger discovered that a
pushed - button 0 event is valid, I realize I could yet again rework the “original” Xiaomi Button driver to use
button 0 as a “released” state that always happens when the button is released or immediately after a multi-click. Would that be a “prettier” way of doing it for WebCoRE use?
@veeceeoh I think that would be a more cleaner way of reporting clicks, but I also have doubts on whether it would continue to be possible to use all the events that you opened up for us, once the pushed value starts getting reset to 0. I think some testing would be needed there and I’d be glad to help.
Maybe @ajayjohnm could chime in here, because my latest code revision is working for him. I really need to get WebCoRE installed to fully understand the interaction because it’s clearly not the same as what Rule Machine, Button Controller, and other apps are using for button events.
@bertabcd1234 In webCoRE, buttons only show up in the ‘Holdable Buttons’, ‘Sensors’ and ‘Battery Powered Devices’ sections. If you are currently looking into the ‘Buttons’ section of the Available Devices menu, then you won’t see your button there.
As for using button clicks as triggers, you always need to use a combination of conditions to pin-point what action took place. For e.g. to use a single button click trigger, use…
buttonHeld did not change
pushed = 1
Lastly, @veeceeoh, if you want to get started with webCoRE, @ogiewon has done all of us a big favor and posted all the fixes and modifications needed to the webCoRE code, to make it run on Hubitat,