HI @jens_rossbach
I was testing my flow again and i think the date range when it goes past midnight does not work,
I noticed that once it was after Midnight the lights no longer turned on, even though i still had it range to 00:30.
Now that you got this new version out i can now test it properly and pass it some example times to see
what output the switch takes.
so did the test.. but times are based on today 08/Nov/20
So ran the 5 test from top to bottom and you can see the 5 outputs and the debug node description.
fyi.. Sunset for me here is 16:22pm
- 14:20:06 = 6am to Sunset (-5) == This is correct .
- 18:00:00 = Sunset to 00:30 == This is correct
- 23:59:00 = Sunset to 00:30 == This is correct
- 00:10:00 = Otherwise == this is wrong it should still be within Sunset to 00:30 block
- 03:00:00 = Otherwise == This is correct.. outside both range checks.
[{"id":"1ec5327b.09e4be","type":"inject","z":"a8cb5dfc.c57cf","name":"14:20:06 (08/11/20)","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1604845206000","payloadType":"num","x":670,"y":720,"wires":[["3ffb9391.04c7fc"]]},{"id":"3ffb9391.04c7fc","type":"chronos-switch","z":"a8cb5dfc.c57cf","name":"Time Check","config":"1beadeb4.3a4291","baseTime":"payload","baseTimeType":"msg","conditions":[{"operator":"between","label":"between Sunset (start) and 00:30","operands":[{"type":"sun","value":"sunsetStart","offset":0,"random":false},{"type":"time","value":"00:30","offset":0,"random":false}]},{"operator":"between","label":"between 06:00 and Sunset (start)","operands":[{"type":"time","value":"06:00","offset":0,"random":false},{"type":"sun","value":"sunsetStart","offset":-5,"random":false}]},{"operator":"otherwise","label":"otherwise"}],"stopOnFirstMatch":true,"outputs":3,"x":890,"y":800,"wires":[["beb84e0f.fa897"],["68add903.96f4a8"],["3c8ed21f.acf22e"]]},{"id":"beb84e0f.fa897","type":"debug","z":"a8cb5dfc.c57cf","name":"Sunset to 00:30","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1080,"y":740,"wires":[]},{"id":"68add903.96f4a8","type":"debug","z":"a8cb5dfc.c57cf","name":"6am to Sunset (-5)","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1090,"y":800,"wires":[]},{"id":"3c8ed21f.acf22e","type":"debug","z":"a8cb5dfc.c57cf","name":"Otherwise","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1060,"y":860,"wires":[]},{"id":"ae242ef2.e05d","type":"inject","z":"a8cb5dfc.c57cf","name":"18:00:00 (08/11/20)","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1604858400000","payloadType":"num","x":670,"y":760,"wires":[["3ffb9391.04c7fc"]]},{"id":"fcd24def.d2349","type":"inject","z":"a8cb5dfc.c57cf","name":"00:10:00 (09/11/20)","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1604880600000","payloadType":"num","x":670,"y":840,"wires":[["3ffb9391.04c7fc"]]},{"id":"3da95f6.86915a","type":"inject","z":"a8cb5dfc.c57cf","name":"3:00:00 (09/11/20)","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1604890800000","payloadType":"num","x":670,"y":880,"wires":[["3ffb9391.04c7fc"]]},{"id":"276932ab.01224e","type":"inject","z":"a8cb5dfc.c57cf","name":"23:59:00 (08/11/20)","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1604879940000","payloadType":"num","x":670,"y":800,"wires":[["3ffb9391.04c7fc"]]},{"id":"1beadeb4.3a4291","type":"chronos-config","name":"Chronos","sunPositions":[]}]
I used https://www.epochconverter.com to get those times for the Inject node.
Does it all look right or have i missed something or doing it wrong.?
Much appreciated .. Thanks.