I’m trying to make a script (my first) that remembers the current scene as well as the previous scene. Once that is done it should set the scene.
Setting the input_text variables works fine. As soon as I try to save the part where I turn on the scene, I get an error: Invalid config for [script]: not a valid value for dictionary value @ data['sequence'][0]['target']['entity_id']. Got None. (See ...).
It’s better to use states('input_text.xxx') notation than states.input_text.xxx, as explained here.
Why do you have a delay between setting the state of the previous and current input_text?
The target option is a recently introduced convention that is, as far as I’ve seen, undocumented. It appears in a few examples in the documentation but there’s no guidance for its usage. If you’ve seen it described anywhere, please let me know.
target was first seen when blueprints were introduced and now it’s trickling into the documentation’s examples for automations that have nothing to do with blueprints. Beyond blueprints, there has been no explanation how it’s supposed to be used in an automation (or even why). I assume it’s part of an improvement but it’s unclear what that might be. Automations continue to work well without employing target and are less verbose as well.