I currently have a script in HASS that checks whether a loft light is on or off that runs every 2 minutes and turns on one of the three notification leds on an ESP32 box, since the state is sometimes unknown I want the “light is on LED” to always show the true status of the light. I restart HomeAssistant once a day or sometimes need to reboot my router so I can’t depend on a state change trigger to accurately reflect the state of the light. The switch is also triggered manually. I have a feeling this is only possible by polling intermittently but thought I’d ask.
Contiuous polling is rarely necessary.
While a single state trigger may not be sufficient, you can always add triggers to handle restarts and router reboots.