Hi Friends, I need some help building a light automation.
I have two automations today: one that turns on the external lights at 5pm and another that turns them off at 2am. BUT, if there is a power failure for example at 8pm, when everything turns back on, the lights won’t turn on, since the automation was to turn them on at 5pm.
How do I make an automation not to only turn the lights on at 5pm but to check if time is >= 5pm and < 2am, make sure the light is on?
The HA Server is on a UPS, but the lights aren’t, so, even with a trigger on HA start, I would need something that keeps checking the lights and keeps trying to turn them on, so, when power is restored and lights are connected, then they receive a command to turn on…
Neither are lights that don’t turn back on with event triggers
I don’t use them frequently, but sometimes they work the best, and a time trigger every few minutes is hardly going to raise the CPU and certainly easier than building voltage sensors.
Does the UPS have a USB or network management port you can use? I monitor status and voltage through mine, and use that to trigger network shutdowns during an extended failure. When UPS goes from OnBattery->Online for x seconds, if lights are off and time is between x and y, turn on lights.
The other thought it whether the lights have a way of setting them to return to their former state. I know some zigbee/zwave lights support sending commands for them to turn on/off or previous state after a power failure.