pair
property of the driver defines a list of views, which the user navigates through. These views are called pairing templates. Homey includes a set of system templates that implement consistent pairing steps for most devices.driver.compose.json
:list_devices
and add_devices
. The navigation option determines which of the steps the pairing will go to when the user presses the "Next" button.navigation
object also supports a prev
option for when a user can go back to the previous screen. This can be useful, for example, with a login_credentials
system templates to allow users to retry logging-in.list_devices
and add_devices
templates you can use the Driver#onPairListDevices()
method to quickly implement a pairing process. From this method you can return a list of devices that will be presented to the user.Driver#onPairListDevices()
or session.setHandler("list_devices")
."template": "list_devices"
data
property.singular
boolean
false
list_devices
template is very common the Driver#onPairListDevices()
method exists which you can implement instead of the Driver#onPair()
method."template": "add_devices"
list_devices
, and finish the pairing session."template": "login_oauth2"
Options
When eitherhint
orbutton
are set to a value, a button will appear and wait for the user to click it before opening the popup.
"template": "login_credentials"
logo
string
null
"template": "pincode"
type
string
"number"
number
or text
. This changes how the keyboard is presented on mobile phones when the pincode field is selected. length
number
4
"template": "loading"
"template": "done"
repair
to your App Manifest:Homey.createDevice()
method is not available in the custom view and you can add a onRepair
method to your driver, which is similar to the onPair
method.