CtrlK
BlogDocsLog inGet started
Tessl Logo

jbaruch/hubitat-dev

Context for developing and debugging Hubitat Elevation apps, drivers, and hub environment — sandbox constraints, lifecycle idioms, capability contracts, plus grounded deploy/log-tail/lint mechanisms.

Quality

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

High

Do not use without reviewing

Overview
Quality
Evals
Security
Files

input-types.mdskills/_reference/

Preference Input Types

Source: App Preferences, Driver Preferences. Inputs land in settings[name] and are readable bare as name.

Types (apps and drivers)

TypeGroovy valueNotes
textString
textareaStringapp only; opt rows
passwordString
numberLong/Integer
decimalDouble
boolBooleanon/off slider
enumString, or List if multiplerequires options: (List, or List of single-entry Maps for key≠label)
timeString yyyy-MM-dd'T'HH:mm:ss.sssXX
dateString
emailString
colorMapapp only
capability.<name>DeviceWrapper (or List if multiple)app only — device selector by capability; <name> is camelCase (e.g. capability.switch, capability.motionSensor)
device.<DriverName>DeviceWrapperapp only — selector by driver name
buttonapp only; fires appButtonHandler(String) and refreshes the page

Common input options

title:, description:, required: true, defaultValue:, multiple: true, submitOnChange: true (re-render page/prefs on change — the key to dynamic UIs), width: 1..12, range: "low..high" (number/decimal, e.g. "0..100"), options: (enum), disabled:, showFilter: (capability inputs).

Shape differences

  • Apps nest inputs in preferences { page { section { input ... } } }; single-page apps may drop page and go straight to section. Dynamic UI uses dynamicPage(...) returned from a method with submitOnChange inputs.
  • Drivers have one flat metadata { preferences { input ... } } — no page/section, no device-selector or button inputs.

The logging-preference convention

Nearly every community driver/app exposes these two, guards chatty logs on them, and auto-disables debug after 30 minutes:

input name: "logEnable", type: "bool", title: "Enable debug logging", defaultValue: true
input name: "txtEnable", type: "bool", title: "Enable descriptionText logging", defaultValue: true

See the logging-conventions rule for the full runIn(1800, logsOff) idiom.

README.md

tile.json