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

"sources" data in schedule output from "Merger"-nodes severely slows down performance of HA when sending it to HA sensor #147

Open efauske opened 1 year ago

efauske commented 1 year ago

I have a rather large schedule where the final schedule output to HA has been through three merger nodes: bilde

In the schedule payload, the "hours"-objects have a "sources" object with information about which merger they originated from. When I send this payload to a HA sensor (using ha-config node as in example provided here ) HA seems to freeze and stop responding (I am also visualizing this schedule in lovelace using apex-charts from same example, but not sure exactly what causes HA to freeze up).

However, if I alter the Function node to also delete the "source" object from "hours", then it works just fine: bilde

While this is an easy fix, it may be an idea to make it optional on the "Merger" node to not include this in output, in case someone wants to visualize a schedule with a lot of merges.

ottopaulsen commented 1 year ago

Good idea.