Project Home‎ > ‎Documentation‎ > ‎Devices‎ > ‎

Location

States supported - LIGHT, DARK

The location device is essentially a virtual Photocell that will turn dark / light automatically based on the system clock and the specified location. Location provides a Sunrise/Sunset device that turns on at sunset and off at sunrise.

It supports STANDARD, CIVIL, and ASTRONOMICAL. In a nut shell CIVIL is brighter than STANDARD which is brighter than ASTRONOMICAL.

Attributes:

  • latitude

  • longitude

  • tz == Time Zone for your location

  • is_dst == Do you observe daylight savings time

Examples:

# Monitoring twilight # Define a virtual photocell based on longitude and latitude and # whether daylight savings time used at that location. ph_civil = Location('35.2269', '-80.8433', tz='US/Eastern', mode=Location.MODE.CIVIL, is_dst=True) ph_standard = Location('35.2269', '-80.8433', tz='US/Eastern', mode=Location.MODE.STANDARD, is_dst=True)
Comments