victronenergy / node-red-contrib-victron

MIT License
87 stars 18 forks source link

[BUG] WIKI Example flows page; incorrect code example #179

Closed topnotchit1 closed 10 months ago

topnotchit1 commented 11 months ago

On the Example workflow WIKI page, Section "Charge batteries only using night time rates – unless the SoC is critically low"

The code is incorrect. When Imported, the "Night" function uses && rather than ||. This mistake causes the logic to fail if it is 12a-6a, because the >=22 fails first which causes the FALSE immediately without checking the next evaluation. || would require either/or to be true. The WIKI page would not allow me to edit nor suggest edits, so reporting it here.

dirkjanfaber commented 10 months ago

Changed it in the wiki (the example was already correct in the included examples). Thanks for reporting!