Whenever I’m creating a new automation sequence in the UI, I often find myself copying and pasting bits of yaml within the sequence. This is particularly prevalent when using the Choose action, where certain conditions are common across some, but not all options (you can’t duplicate a Choose option either, but that’s another issue entirely).
The process for such actions is, at present, a long and clicky one, as demonstrated below.
Click 1: Expand an action
Click 2: Click 3 dot menu
Click 3: Click “Edit in YAML”
Click 4a: Ctrl-A, Ctrl-C or right-click over the YAML text and select “Select All”
Click 4b: Right click and select “Copy”
Click 6a: Click “Add Option” if not already added
Click 6b: Click “Add Action” in the desired Option
Click 8: Select any Action from the list of Actions
Click 9: Expand the newly created action
Click 10: Click the Action’s 3 dot menu
Click 11: Click “Edit in YAML”
Click 12: Ctrl-A or right-click over the YAML text and click “Select All”
Click 13: Ctrl-V or right-click over the highlighted YAML text and select “Paste”
Phew! That’s a process far more lengthy than it really ought to be. Perhaps two extra 3 dot menu items could be added to speed up the process?
Copy All from YAML
Paste to replace YAML
Extra bonus points if the resultant new Action would expand to the newly pasted YAML automatically, making it easy to make swift changes to the newly created action’s variables.
Extra EXTRA bonus points for adding a “Paste YAML” option to the Add Action menu. If nothing to paste, or the YAML is invalid, an error message could then be generated
Extra EXTRA EXTRA!!! bonus points for adding Copy Option and Paste To New Option to the Options branch
Much joy would then be expressed across the entire HA community! Volunteer Programmers be praised!