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

Reduce errors and warnings #124

Open erikbjork opened 2 years ago

erikbjork commented 2 years ago

When e.g. the lowest price strategy node tries to calculate it's schedule, but currently is outside it's configured period, it outputs "No schedule" as a warning using node.warn. This warning is outputted in the debugging console every time any inputs to the strategy node gets updated. I would suggest to not use node.warn in these cases since theres nothing wrong with that. This is expected and handled by letting the user configure what to output when outside the period.

https://github.com/ottopaulsen/node-red-contrib-power-saver/blob/202a4a990b117d68636a8997ec07822cdb64e4a4/src/handle-output.js#L88