page (id, definition)
app.page.('pageOne', (page) => {
page.nextPageId('pageTwo')
...
})
Creates a new configuration page. All pages must have an ID, which is used to reference the page in link and next/previous fields.
Specify the name appearing at the top of this page. If omitted and i18n localization has been configured then this text is taked from the appropriate locale file.
If true then the Done button appears on the page, allowing the app to be installed or updated.
ID of the page to display when the Next button is pressed.
ID of the page to display when the Back button is pressed.
section([title], definition)
app.page.('pageOne', (page) => {
page.section('Select sensors', (section) => {
section.hideable(true)
...
})
})
Add a section to the page. All inputs are contained within a section. Sections optionally can have a title
Section contents can be displayed or hidden on the page. Hideable sections should have titles for clarity.
hidden(value)
The initial state of the section is hidden.
app.page.('pageOne', (page) => {
page.section('Select sensors', (section) => {
section.deviceSetting('motionSensors')
.capability('motionSensor)
.multiple(true)
})
})
The following properties can be set for any type of setting