devRoemer / node-red-contrib-time-switch

A node that switches on and off depending on the current time
MIT License
3 stars 0 forks source link

start sunset end 10pm #8

Closed bergjet closed 4 years ago

bergjet commented 4 years ago

V1.0.4 Here the timer switches from sunset to 10pm next day. I want to switch from sunset to 10pm on the same day.

ghost commented 4 years ago

@bergjet I did a quick test and had a look into the unit tests. The described behavior only appeared if the end time is before the start time. Which start and end times are you seeing below the node?

Just to be sure: Did you enter the time in 24h format? (instead of 10:00 it should be 22:00)

If my assumption is right i would suggest that i introduce a checkbox where it is possible to configure if the end time can switch to the next day or if the range just gets 0 then.

bergjet commented 4 years ago

Die Version 1.06 funktioniert nun gar nicht. Version 1.06 now does not work at all. Its now 22:30 Look at the picture.

ghost commented 4 years ago

the issue related to the end time is fixed now. I will take a closer look at the sunset logic. A library update might have introduced a change here

ghost commented 4 years ago

Fixed with 1.0.8.

First flow: End is before start - Assuming that the end is wished on the next day Second flow: Was outside of the range - The status line shows that the range is reached on Apr 13th Third flow: Was inside the range - Shows the end time of the active range

grafik