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

Feature request: On / Off (Away) / Auto functionality for the schedulers? #95

Open marhoy opened 1 year ago

marhoy commented 1 year ago

In most cases where it's nice to use these schedulers, I also have the need to sometimes manually override the automatic scheduler. Examples:

Currently, I have implemented such logic by using an input_selector in HA, and writing to / checking a flow-variable to figure out what mode we're in. But I think it would be much more elegant (and easier for beginners) if this type of logic could be built right into the schedulers themselves. The mode could be received as a dynamic config, and the behaviour could be:

Mode "On":

Mode "Off" (or "Away"):

Mode "Auto":

What do you think?

ottopaulsen commented 1 year ago

This is pretty much exactly what I have been thinking myself, and it is on my list :-)

marhoy commented 1 year ago

I'm not a Javascript developer, but I cloned the repository yesterday and got it running in Node-RED via the debugger in VS Code 😊

I've been asking for many new features, so I'll have a look and see if I can contribute with some PRs myself... 😉

ottopaulsen commented 1 year ago

PRs are welcome :-) It may be a good idea to start by describing and discussing the feature before coding it. A github issue is a good place to do this. Alternatively FB Messenger.

marhoy commented 1 year ago

I tried contacting you on FB messenger.

ottopaulsen commented 1 year ago

If you sent me anything important on FB Messenger before I contacted you, you need to resend it, as I didn't get anything.

ottopaulsen commented 1 year ago

Take a look at the new override function in version 4.1. If it solves your need, please close the issue.