I am fairly new to Home Assistant and my knowledge on YAML is very limited. I do just about everything in the UI. I can however follow simple yaml code fairly easily
Here is my scenario. In South Africa we struggle with load shedding and I have set automations to switch off certain lights and appliances during load shedding. I have installed a Tuya loading sheeding detector which is a modified garage opener. HA then detects that the mains power has been cut. If my battery backup system last the period of load shedding then I have no problem. However if my batteries run out and i lose power completely for a time and then comes back on the my automation just sits and do not trigger.
I run HA on an Intel NUC and its set to power up automatically when power comes back.
How do i get automation to look for return of power and trigger automatically or alternatively to continally check for power availabilty.