I’ve searched around for help with this and found some references to similar problems but I was unable to understand them. I was hoping that if I describe precisely what I want to do, one of you smart people will be able to help :).
I have Tesla Powerwalls. Due to the way they are connected to my house, they will not power my AC outdoor units when the grid is out. I would like a flow that will detect the grid outage and then tell my Ecobee thermostats to turn off (so that I don’t bother blowing air that is not being cooled). Then, when the grid comes back, I want to turn the AC back on.
Here’s how I want the flow to work:
- If the grid goes down and the thermostats are set to “cool”, then turn off the thermostats. I don’t want to turn off the thermostats if they are set to “off” or “heat” since there’s no need in these cases.
- If the thermostats were turned off as a result of #1 above, I want to turn them back to “cool” when the grid comes back. I don’t want to just set the thermostats to cool unconditionally since they may have been previously set to “off” or “heat”.
If I look at this from a programming perspective, it feels like I would want to set some variable if #1 happens, then condition #2 happening only if #1 happened first. I’m using the events:state and current state nodes to detect when the grid goes down while thermostat is set to cool. This successfully does #1. Now, I’m stuck as to how to condition turning AC back on.
If there’s an entirely different way to accomplish this, lay it on me :). I’m still getting used to this message passing paradigm of node red.
Attached is a picture in case it helps. Ignore the “heat at” text below the current state node…I’m testing with the thermostat set to heat because it’s March :).