Homey App Settings allow you to add custom html pages to your app that users can access through the apps list. App Settings can be used for global configuration parameters for your app.
A Homey App can save settings that are persistent across reboots. These settings can be accessed from anywhere in your app through ManagerSettings. You can also create a page where users can update the App Settings.
Custom app setting views are not allowed on Homey Cloud. Any information your app might need to function should be asked for when pairing a device. Read the Custom Pairing Views documentation for more information.
The settings view will be hidden until this method has been called. Use the extra time to make required API calls to prevent flickering on screen.
Homey.get( [String name,] Function callback )
Gets a single setting's value when name is provided, or an object with all settings when name is omitted.
Homey.set( String name, Mixed value, Function callback )
Sets a single setting's value. The value must be JSON-serializable.
Homey.unset( String name, Function callback )
Unsets a single setting's value.
Homey.on( String event, Function callback )
Register an event listener for your app's realtime events. System events when modifying settings are: settings.set, settings.unset.
Homey.api( String method, String path, Mixed body, Function callback )
Make a call to your App's Web API. The first argument method can be either GET, POST, PUT or DELETE. The second argument path is relative to your app's API endpoint. The third argument body is optional, and null can be provided to ignore it. For example:
Homey.alert( String message[, String icon], Function callback )
Show an alert dialog. The second parameter icon can be null, error, warning or info.
Homey.confirm( String message[, String icon], Function callback )
Show a confirm dialog. The second parameter icon can be null, error, warning or info. The callback's 2nd argument will be true when the user pressed OK.
Homey.popup( String url[, Object opts] )
Show a popup (new window). The object opts can optionally have a width and height property of type number. The default width and height is 400.
Homey.openURL( String url )
Show a new window.
Homey.__( String key [, Object tokens] )
Translate a string programmatically. The first argument key is the name in your /locales/__language__.json. Use dots to get a sub-property, e.g. settings.title. The optional second argument tokens is an object with replacers. Read more about translations in the internationalization guide.