826ef4abb4
* Rename collection folders Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de> * Change all occurences of addons and repos Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de> * Add further corrections Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de> * Remove temporary directories after processing Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de> * Reduce addons menus, show current uncond. Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de> * Fix typo Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de> * Remove redundant addons from permalinks Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de> * Sort UI menu entries correctly Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de> * Split maven command Signed-off-by: Thomas Dietrich <Thomas.Dietrich@tu-ilmenau.de> |
||
---|---|---|
.. | ||
readme.md |
readme.md
id | label | title | type | description | source | since | install |
---|---|---|---|---|---|---|---|
astro | Astro | Astro - Actions | action | With the Astro actions, you can calculate sunrise and sunset DataTime values in rules. | https://github.com/openhab/openhab1-addons/blob/master/bundles/action/org.openhab.action.astro/README.md | 1x | manual |
{% include base.html %}
Astro Actions
With the Astro actions, you can calculate sunrise and sunset DataTime values in rules.
Important: The action also requires the installation of the corresponding Astro 1.x binding.
Examples
import java.util.Date
rule "Astro Action Example"
when
...
then
var Date current = now.toDate
var double lat = xx.xxxxxx
var double lon = xx.xxxxxx
logInfo("sunRiseStart: ", new DateTimeType(getAstroSunriseStart(current, lat, lon)).toString)
logInfo("sunRiseEnd: ", new DateTimeType(getAstroSunriseEnd(current, lat, lon)).toString)
logInfo("sunSetStart: ", new DateTimeType(getAstroSunsetStart(current, lat, lon)).toString)
logInfo("sunSetEnd: ", new DateTimeType(getAstroSunsetEnd(current, lat, lon)).toString)
end