0.113: Automations & Scripts, and even more performance!

Another special, themed, release inbound!
It seems like @bdraco is unstoppable; he just keeps going on improving
the performance of the Core. I truly admire him for the work he has been
delivering the past months, however, that is not the point of this release.
Sorry, @bdraco !
This release is about: Automations & Scripts! Yes!!!
A long, long time bug with automation triggering has been resolved, but not
only that, @pnbruckner went all-in by extending the automation/script engine
even more.
Adding repeat, a chooser and running modes (with cool down possibilities as a side-effect).
I’ve been playing with these features on my home already and I’ve
changed/improved quite a few things. For real, @pnbruckner , thank you!
Enjoy the release!
Ludeeus joins Nabu Casa
Today we’re happy to announce that @ludeeus is joining Nabu Casa to work
full-time on Home Assistant!
Ludeeus has been a core contributor for a long time working on the Supervisor
panel and different bits of the frontend. He is, however, mainly known as the
creator of the Home Assistant Community Store (HACS) .
We’re looking forward to seeing what he can do now that he is able to focus
full-time on Home Assistant.
Welcome @ludeeus !
Automations & Scripts
This release brings changes to our automations and scripts. Before we start with
this all, please note, that the action part of an automation is a script
sequence .
So, all discussed below, apply to both scripts and automations.
Before diving in: All automation and script changes, have been driven by
@pnbruckner ! It is awesome! Thanks!
Automations & Scripts: Bug fix
There has been an issue with our automations for a long time already, which
you actually might have never noticed. It is kinda hard to explain, so this
needs an example.
Consider the following automation:
- alias: "Example"
description: "On button press, turn on the light bulb for 10 seconds."
- platform: state
entity_id: binary_sensor.button
to: "on"
- service: light.turn_on
entity_id: light.bulb
- delay:
seconds: 10
- service: light.turn_off
entity_id: light.bulb

This automation turns on a light bulb when the button is pressed, and after
10 seconds, it turns off the light bulb again. A fairly basic automation, which
does exactly what one would expect, except when a button is pressed twice.
So it takes 10 seconds for the bulb to turn off, what if you press the button
again after 5 seconds?
Please, think about this for a moment…
What actually...