ottopaulsen / node-red-contrib-power-saver

A Node-RED node to saver money by turning off when the power is most expensive
Other
70 stars 17 forks source link

Daylight Saving Time issue - Schedule Merger Node #178

Open Vantive1 opened 8 months ago

Vantive1 commented 8 months ago

Hi! This night we changed DST and I examined the output of the schedule from a Schedule Merger Node I have set up. I compared it with what was sent to the node and what was coming from Tibber. I found that there is a price element missing after the Schedule Merger Node, due to DST change.

Output from Tibber Query node (price array snippet): Skärmavbild 2023-10-29 kl  15 10 03

Input to Merge node from Fixed Schedule Node: Skärmavbild 2023-10-29 kl  15 15 20

Input to Merge node from own Hours array: Skärmavbild 2023-10-29 kl  15 18 06

And output from Schedule Merger Node after merge. If you compare the input/output above you can see that after the Schedule Merger Node the MTU with UTC time 24:00 (midnight) and price 0.4958 is missing: Skärmavbild 2023-10-29 kl  15 06 18

Here is what I was expecting:

UTC 23:00 -> 2023-10-29T01:00:00.000+02:00 with price 0.523
UTC 24:00 -> 2023-10-29T02:00:00.000+02:00 with price 0.4958
UTC 01:00 -> 2023-10-29T02:00:00.000+01:00 with price 0.4518

Could it be a bug in the Power Saver DST handling?