Note, there is a new version pimatic-sunrise which allows for setting a timezone
property on a SunriseDevice
to transform the times from the given timezone to the local timezone while ignoring the timezone offsets as shown in the example below.
Sample Configuration
{
"latitude": 10.7659164,
"longitude": 106.4034617,
"timezone": "Asia/Ho Chi Minh",
"attributes": [
{
"name": "sunrise",
"label": "Sunrise"
},
{
"name": "sunset",
"label": "Sunset"
}
],
"id": "vietnam",
"name": "Vietnam/Ho Chi Minh",
"class": "SunriseDevice"
}
README Addendum
Note, all times will be given in the local time zone of the system on which pimatic is installed. If you wish to obtain the times in the local timezone of the location at given coordinates you can additionally set the timezone
property to the appropriate timezone. This will transform the times to the
given timezone and will cut off the timezone offsets before converting the resulting times to the localized time string. For a list of valid “TZ” timezone strings, see Wikipedia - List of Timezones. If the timezone
property is absent or set to an empty string no transformation will be performed.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law