The recent updates to the automation editor have helped people avoid falling into the trap of controlling devices vs entities, but the default first action in a script is a device action. As you can no longer change action types (in the GUI), I’d suggest removing this.