ottopaulsen / node-red-contrib-power-saver

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

PriceReceiver - Array with value 0 is truncated #97

Open jonascarlssonit opened 1 year ago

jonascarlssonit commented 1 year ago

When the price source provides the PriceReceiver node with an array of price per hour it seems to filter out elements with a price value of zero (0). This creates problems further down the chain for the PriceStrategy node trying to create a schedule. Filtering for null or something non-digit would probably be the best.

Please note that the prices from the price source can actually be negative, despite how strange that might sound.

ottopaulsen commented 1 year ago

Note to self: The bug is in recrive-price-functions, convertMsg. The filters on Nordpool data is on value. Use start instead.

ottopaulsen commented 1 year ago

This should be fixed in version 4. Can you please confirm, and close this issue?

jonascarlssonit commented 1 year ago

Thanks Otto, I will check this but I suspect that I can't verify the fix until the pricing module sends data containing SEK 0 values which probably wont happen this year:-)