Your Core updates are WAY behind. @parautenbach makes a valid point. Is your original post an AI response or copied from Troubleshooting automations - Home Assistant?
Check out ![]()
Format it properly to understand when code format is needed in the forum.