This is the vscode template I use for local Home Assistant development.
Even it is quite easy to customize code and configuration in your own Home Assistant instance, it is not handy to do some real development, as it requires a lot of instance restart, and creates some garbage in your database.
Just reopen the folder in the container.
The container will be built with latest Home Assistant version.
Three tasks are added to your taskbar (thanks to actboy168.tasks vscode plugin, you will need to install it if you want to use those outside the container) ; those taks can take some time before shoing up in the taskbar, please wait...
Start HA: start Home AssistantRestart HA: restart Home AssistantStop HA: stop Home Assistant
Home Assistant is started by default on port 8123. To avoid conflicts with another instance on your computer, the devcontainer map this port to 9123. So when using the devcontainer, once started, open https://localhost:9123
On the first startup, you will need to configure your developpement instance. A bunch of files will be generated, and some configuration yaml file you may not want, you can safely delete them.
All the settings will be kept in your /config folder. The provided .gitignore file exclude most of database and storage files.
If you want to reset to a fresh instance, you can delete the database, .storage folder and other files.
Backups are encrypted with a home assistant specific method, so it is not eay to unpack to restore parts of it.
To import backup, you can do it by the web setup UI.