I’m in the progress of migrating my automations from Reactor to Node Red. I’m still very new to Node Red.
One of the automations worked something like this (for a RGBW LED strip behind a buffet unit):
At sunset, cool white.
At 9PM, warm white.
At 10PM, orange
At 11PM, RED
At 12PM turn off.
If the alarm is armed, then turn off and don’t turn on as scheduled.
If the alarm is disarmed during one of the scheduled times, then turn on as scheduled, even if partway through the schedule.
This was trivial to do with Reactor but I’m struggling with Node Red.
To achieve, I have:
- Created an input boolean helper in HAss named “NoOneIsHome”. This is toggled on and off by the alarm integration via a Node red flow and works fine. I created a helper on the basis that later on home occupancy may be determined by other things so I can just change one flow and everthing else that depends on it automatically updates.
- Created four scenes in HAss for the LED strip, named Warm, Cool, Orange, Red etc.
I’ve created this flow. It seems to be awkward and clunky. Is there a better way to do this?
(It also doesn’t have the feature that if I arrive home between sunset and midnight, the light should come on to the correct color. Instead what I think will happen is I will arrive home and then light will come on when the timer next triggers. I guess I could use the every-minute output of BigTimer but then if someone changes the LED strip manually it’ll be overidden within a minute.)