I tried to do as you told me but wasn’t able. My air purifier tells me the AQI, I can switch it on by time pattern /5, but wasn’t able to switch off when the AQI is <= 1 for one minute. Because Numeric state trigger only fires on change it won’t fire if it stays the same. So if I start with 1 when switching on then won’t switch off.
Sometimes does, then the automation would work, but usually it stays at constant 1. This is why I want to automate it to periodically check and only use the filter/electricity when needed.
At the moment the switch on is /15 and the check if 1 then switch off at /7. But it is ugly. This is why I need the normal cron expression.
I would love having cron as an option. This would be optimal for automations that you want to fire every other Wednesday, the 1st of the month, or the first Thursday. Or maybe you want a script that runs annually or every 4 months.
It could also be a handy condition. Maybe you want a condition that only fires on even days or only works in July.
Templates could be used, but I think there is a strong argument that supporting CRON is worth it since a lot of people are familiar with it.
Tom! You are right with the switching on without cron. But the check and switching off don’t work if I quote the attitude or not. In the documentation it is written clearly that numeric state trigger only works if there is a change, if it stays the same for days it won’t activate.