Automation only triggering some of the time