Difference between revisions of "Location Object"
Line 22: | Line 22: | ||
===<code>hubs</code>=== | ===<code>hubs</code>=== | ||
A list of hubs for this location as a List<Hub>. In Hubitat there is only one Hub in the list. | A list of hubs for this location as a List<Hub>. In Hubitat there is only one Hub in the list. | ||
+ | ===<code>hub</code>=== | ||
+ | The Hub for this location. | ||
+ | |||
==Methods== | ==Methods== |
Revision as of 16:08, 25 September 2019
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 Drivers via the "getLocation()" method or simply using the property "location".
Contents
Properties
id
A unique id for the location, as a Long.
name
The name of the location as a String.
temperatureScale
The temperature scale of the location as a String (C or F).
timeZone
The time zone of the location as a TimeZone object.
zipCode
The zip code of the location as a String.
latitude
The latitude of the location as a BigDecimal.
longitude
The longitude of the location as a BigDecimal.
sunrise
The sunrise of the location as a Date.
sunset
The sunset of the location as a Date.
hubs
A list of hubs for this location as a List<Hub>. In Hubitat there is only one Hub in the list.
hub
The Hub for this location.