I read in a post comment from Mike Maxwell that Hubitat folks don't like the "button" capability. Stating the proper way to initialize a button is to use the functional capability ( i.e. capability.pushableButton). I've not tested but one might assume to subscribe to a "HoldableButton" an additional input statement would be required.
However for the thermostat, from the single input statement (as below) will allow access to all the capabilities of that thermostat.
Does anyone know why the "button" is discouraged (or not allowed) causing it to act differently than all/most other devices?
def mainPage() {
dynamicPage(name: "mainPage", title: " ", install: true, uninstall: true) {
section {
input "thermostatID", "capability.thermostat", title: "Thermostat", multiple: false, required: true
input "buttonID", "capability.pushableButton", title: "button", multiple: false, required: true
// input "buttonNumber", "number", title: "Select Button Number", required: true } (for future reference)
}}}
Thanks to csteel for his "Get Attributes App"
Device Sonoff Zigbee Button Controller
-= Capabilities =-
[Configuration, Actuator, Battery, HoldableButton, PushableButton, DoubleTapableButton]
-= Attributes =-
[pushed, numberOfButtons, battery, doubleTapped, held]
-= Commands =-
[configure, doubleTap, hold, push]