Add sunset and sunrise variables...#1507
Conversation
|
That's some well programmed PR :) |
|
Also added some basic documentation to the wiki |
|
Mhhh... another idea for a solution on the long run. Currently variables are implemented either as strings or floats. So on actions e.g. "Clock#Time=All,%sunset%" is usable, but not a comparation like "%sunset%>18:00". If all time variables are internally handled as timestamps and with some macros for string conversation, there would be no further distinction between both cases needed... In this way, the suggested offset could be added or subtracted in the script. |
...for use in rule scripts as addition to time formulas. Calculation is based on geographic location which is configurable in advanced settings. Used algorithm is a tradeoff between computation time and accuracy. Both variables output a string value.