https://rc.home-assistant.io/blog/2...a-feedback-automation--script-variable-scopes
In this beta, the scope of variables has been changed to be more consistent andintuitive. Variables are now scoped “globally” in the automation or scriptrun. This means that if you define a variable in one action, it will beaccessible in all subsequent actions, regardless of their nesting level.