Often when writing an automation with the HA UI, I will first create a series of actions which later I will desire to duplicate, modify slightly, and constrain by various conditions via the Choose or If-Then action. Currently, I have to manually recreate the action series under the Choose or If-Then action sub-actions. It would be awesome if the UI editor could easily move action series in and out of the Choose/If-Then Action sub-actions.
I was about to create a topic for this when I saw yours.
This would be a great feature.
Not only move them in out Choose/If-Then Action (don’t forget And, Or & Not). It would also be cool if we can just drag the order of triggers/conditions/actions.
I agree. Furthermore, changing the order of options within the Choose action is also not permitted via the UI.
There is a solution that is more cumbersome which requires you to transiently view the automation in YAML where the order can be quickly copied and pasted into a different arrangement, but frustrating it requires adding spaces before arguments if it changes sub action categorization.
Well… I was watching the State of the Open Home 2022 and they mentioned a re-order function.
So I was curious and checked an automation. Turns out there is a re-order function.
If you press the 3 dots in the top right corner of a Trigger/Condition/Action etc. There is a function called ‘Re-order’. This activates re-order mode and now you can drag & drop triggers etc arround.
This also works in Choose, but sadly doesn’t work in conditions yet.
I have never heard or read anything about this function.
I don’t understand why this mode is not standard on, but it is there at least
Yes! I love to use this reorder feature as well! What I’m hoping to do is drag an action from the main hierarchical sequence list into the list within a choose sequence list.
In the below YAML configuration, I’d like to drag action 1 below action C (into the choose function) or alternatively action A below action 3 (outside of the choose function)
trigger:
- platform: ....
condition:
- condition: state....
action:
- action 1
- action 2
- action 3
- choose:
- conditions:...
sequence:
- action A
- action B
- action C
- conditions:....
sequence:
- action D
- action F
- action G