Automation looses device condition after a power loss

Every time my home assistant goes down one of my lights “looses” the condition in the automation and becomes “Unknown Condition” instead of “Porch is on”.

How do I prevent this from happening?

I dont know why this happens but can you try the condition with conditon type state. And then check if this persists.