The Location object is composed of methods that allow you to interact with the settings and values of a location. This object is available to apps and privers via the "getLocation()" method or simply using the property location
.
A unique id for the location, as a Long.
The name of the location as a String
.
The temperature scale of the location as a String
(C or F).
The time zone of the location as a TimeZone
object.
The zip code of the location as a String
.
The latitude of the location as a BigDecimal
.
The longitude of the location as a BigDecimal
.
The sunrise of the location as a Date
.
The sunset of the location as a Date
.
The current status of the Hubitat Safety Monitor. This is a String
of one of the following values: armedAway
, armingAway
, armedHome
, armingHome
, armedNight
, armingNight
, disarmed
, allDisarmed
A list of hubs for this location as a List<Hub>
. In Hubitat, there is only one Hub in the list.
The hub for this location.
Retrieves whether or not the hub is set to 12 or 24 hour time.
int getTimeFormat()
12 if the time is set to 12 hour (am/pm), 24 if it is set to 24 hour.
Get a list of modes for the location.
List<Mode> getModes()
Get the current mode of the location.
String getMode()