|
|
Line 1: |
Line 1: |
− | 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".
| |
| | | |
− | ==Properties==
| + | <big>'''We're moving!''' Please visit http://docs2.hubitat.com for the latest documentation.</big> |
− | ===<code>id</code>===
| |
− | A unique id for the location, as a Long.
| |
− | ===<code>name</code>===
| |
− | The name of the location as a String.
| |
− | ===<code>temperatureScale</code>===
| |
− | The temperature scale of the location as a String (C or F).
| |
− | ===<code>timeZone</code>===
| |
− | The time zone of the location as a TimeZone object.
| |
− | ===<code>zipCode</code>===
| |
− | The zip code of the location as a String.
| |
− | ===<code>latitude</code>===
| |
− | The latitude of the location as a BigDecimal.
| |
− | ===<code>longitude</code>===
| |
− | The longitude of the location as a BigDecimal.
| |
− | ===<code>sunrise</code>===
| |
− | The sunrise of the location as a Date.
| |
− | ===<code>sunset</code>===
| |
− | The sunset of the location as a Date.
| |
− | ===<code>hsmStatus</code>===
| |
− | 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
| |
− | ===<code>hubs</code>===
| |
− | 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==
| + | <big> |
− | ===<code>getFormattedLatitude</code>===
| + | This document is available at: http://docs2.hubitat.com/en/developer/location-object |
− | ===<code>getFormattedLongitude</code>===
| + | </big> |
− | ===<code>getTimeFormat</code>===
| |
− | :Retrieves whether or not the hub is set to 12 or 24 hour time.
| |
− | | |
− | :;Signature | |
− | :: <code>int getTimeFormat()</code> | |
− | | |
− | :;Returns
| |
− | :: 12 if the time is set to 12 hour (am/pm), 24 if it is set to 24 hour.
| |
− | | |
− | ===<code>getModes</code>===
| |
− | :Get a list of modes for the location.
| |
− | | |
− | :;Signature
| |
− | :: <code>List<Mode> getModes()</code>
| |
− | | |
− | ===<code>getMode</code>===
| |
− | :Get the current mode of the location.
| |
− | | |
− | :;Signature
| |
− | :: <code>String getMode()</code>
| |
− | | |
− | ===<code>setMode</code>===
| |
− | ===<code>currentMode</code>===
| |