Threshold criteria for automations

It would be useful to have a “while” criteria for automations. E.g. Turn on Aircon, while temp >= 25.

it would save having a second automation to turn off the device.

Parameters could include:
Minimum activation time.
Maximum activation time
Delay before activation
Delay before de-activation

What if you have an aircon with multiple settings, like off and 1,2,3 variants of heating.
Your example only work for on/off aircons.

All your parameter examples can easily be done with the current features, so all it does is making it easier for a few cases, but making it more complicated for the developers, which have to maintain even more code and make sure it works in ALL cases.

1 Like

Do you mean…
Script Syntax - Home Assistant.