suncalc msg at startup (#1083)

Thanks Bart.
This commit is contained in:
bartbutenaers
2024-09-24 22:14:50 +02:00
committed by GitHub
parent 55011335ab
commit 23e6147e72
4 changed files with 40 additions and 30 deletions

View File

@@ -4,7 +4,8 @@
<p>Several choices of definition of sunrise and sunset are available, see the <i><a href = "https://github.com/mourner/suncalc" target="_new">suncalc</a></i> module for details.</p>
<p>The start and end times can be offset by a number of minutes before (minus) or after (plus) the chosen event time.</p>
<p>The first output emits a <code>msg.payload</code> of <i>1</i> or <i>0</i> every minute depending if in between selected times or not.
The second output emits only on the transition between night to day (<i>-> 1</i>) or day to night (<i>-> 0</i>).</p>
The second output emits only on the transition between night to day (<i>-> 1</i>) or day to night (<i>-> 0</i>).
When the initial value at startup is required to be sent, that value will be emitted at the second output.</p>
<p>It also outputs <code>msg.start</code>, <code>msg.end</code> and <code>msg.now</code> which are todays start and end times, with offsets applied, in ISO format, and the current ISO time.</p>
<p><code>msg.sun</code> is an object containing the azimuth and altitude, in degrees, of the current sun position.</p>
<p><code>msg.moon</code> is an object containing <thead></thead> position, phase, illumination and icon of the moon.</p>