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.
Returns the internal ID that represents the installed app in Hubitat.
Long getId()
None
The internal ID of the current app.
Returns a value indicating whether the app is currently installed or, if you are in the initial setup, that it is not.
String getInstallationState()
None
COMPLETE
if the app is installed, otherwise INCOMPLETE
.
Get the current label of the installed app.
String getLabel()
None
The current label of the installed app
def appLabel = app.getLabel()
log.debug "app label is ${appLabel}"
Update the label of the installed app
void updateLabel(String label)
label
- new label for installed app
None
Object getSetting(String name)
String name
: name of settingValue of the setting with the specified name
Updates the value of a setting (preference) to the specified value. If the setting does not exist, this method will create it.
void updateSetting(String name, Map options)
options
- Map
with keys type
and value
, e.g.,[type: "number", value: 5]
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)
name
- The name of the setting to updatevalue
- The value to store in the settingNone
Removes specified setting from saved settings (app preferences)
void removeSetting(String name)
String name
- name of setting to removeNone
String getSettingType(String name)
void clearSetting(String name)
Long getName()
List<EventSubscriptionWrapper> getSubscriptions()