Users often feel the urge to exchange automations or scripts for sharing, guidance or debugging.
To do so, using screenshots is NOT the correct way.
Basically, the automation and script GUIs are nothing more then a YAML generator, and the forum is very capable of working with that. Therefore the preferred way of exchanging automations or scripts is to use YAML.
The below examples use the automation editor, but the script editor works the same way.
How to export an automation or script to the forum:
- From within the automation or script editor, select the three little dots in the upper right corner, and choose ‘Edit in YAML’.
- Select the whole text, and copy it to your clipboard.
- Open a post in the forum (or start a new topic), hit the
and paste the content of your clipboard there. - That’s it, you have copied your automation or script to the forum.
How to import an automation or script from the forum:
- On the forum, you will find a copy button on the upper right corner of the pre-formatted text field (the double file icon), hit it and the automation or script will be copied to your clipboard:
- In your HomeAssistant, open a new automation or script, using the 3 dots again, switch to ‘Edit in YAML’
- Delete all text present.
- Paste the contents of your clipboard.
- In most cases you can now switch back to ‘Edit in visual editor.
I say most, as the gui doesn’t handle templates very well (yet). - Make required changes (if any) and save the automation.
- That’s it, you have imported an automation or script from the forum into your HomeAssistant.