Save templates under Developer tools

I really love the template tool under the developer tools and use it on a daily basis. But there are some features I am missing.

First, I work on multiple machines. When I am building a template and want to work further on it on a different machine, I have to save it somewhere or mail it to myself. I guess the template is saved in a local cookie or something like that? It would be nice if it could be saved under my user account of HA.

Also, I often work on different ‘projects’ at the same time. Here I have to clean the old template and copy paste the other one from another source. (textfile/mail/…)

Imagine if you could create a new ‘project’ or select a saved project in the template screen. The ‘saving’ part would be done in the database, so you could use it on every machine where you log in.

And as an added bonus maybe a “private” checkmark that only lets the template be seen by your own user vs every user with templating rights on your HA install.

Technically it is just saving text in the database with a title, a private boolean and a userId and a way to show it (a dropdown and a new button).

This would also create another opportunity. I would argue the chance is small that I am the only one that already has deleted a template when in fact I still needed pieces of it. This Feature Request would create the opportunity to save the last few changes to a project so you could “go back in time”. This involves more coding, but might save someone’s ass when in a pinch. Both at home (we all know the Wife Approval Factor is somewhat weighted by the development speed), but also at work. A lot of companies use HA in the office.

I keep a file called scratchpad.yaml in my config folder. If I need to work on anything from another system I just paste it in there.


I agree that is also an option, but it would be nice if Home Assistant did not only automate my house, but also a bit of the development part. :wink:

1 Like