InstalledApp Object
InstalledApp Object
These methods are usable in app code.
TIP: See also Common Methods, which includes methods available to both apps and drivers. For apps, see also App Object.
getId
Returns the internal ID that represents the installed app in Hubitat.
Signature
Long getId()
Parameters
None
Returns
The internal ID of the current app.
getInstallationState
Returns a value indicating whether the app is currently installed or, if you are in the initial setup, that it is not.
Signature
String getInstallationState()
Parameters
None
Returns
COMPLETE if the app is installed, otherwise INCOMPLETE.
getLabel
Get the current label of the installed app.
Signature
String getLabel()
Parameters
None
Returns
The current label of the installed app
Example
def appLabel = app.getLabel()
log.debug "app label is ${appLabel}"
updateLabel
Update the label of the installed app
Signature
void updateLabel(String label)
Parameters
label - new label for installed app
Returns
None
getSetting
Signature
Object getSetting(String name)
Parameters
String name: name of setting
Returns
Value of the setting with the specified name
updateSetting
Updates the value of a setting (preference) to the specified value. If the setting does not exist, this method will create it.
Signature
void updateSetting(String name, Map options)
Parameters
options-Mapwith keystypeandvalue, e.g.,
[type: "number", value: 5]
Other Signatures
void updateSetting(String name, Long value)void updateSetting(String name, Boolean value)void updateSetting(String name, String value)void updateSetting(String name, Double value)void updateSetting(String name, Date value)void updateSetting(String name, List value)
Parameters
name- The name of the setting to updatevalue- The value to store in the setting
Returns
None
removeSetting
Removes specified setting from saved settings (app preferences)
Signature
void removeSetting(String name)
Parameters
String name- name of setting to remove
Returns
None
Additional Methods to be Documented
String getSettingType(String name)void clearSetting(String name)Long getName()List<EventSubscriptionWrapper> getSubscriptions()