Git workflow scripts to update Home Assistant with an external editor

I like to update Home Assistant configuration with Visual Studio Code and maintaining this in a git repository. I created a few scripts that handles the edit - update - test - deploy cycle.

Still it must be possible to make changes in the Home Assistant Lovelace interface, i.e. scene changes that are more convenient to be done in the interface.

Changes will be managed by git, to enable history tracking and easy undo in case of failure. This project uses two branches:

  • master - the active Home Assistant configuration on the Home Assistant server
  • develop - the branch used to edit the configuration

The update cycle of my Home Assistant configuration have the following phases

  1. Edit home assistant configuration in Visual Studio Code on develop branch
  2. Commit and push development branch to git repository
  3. Activate develop branch on HA server, validate and restart HA server
  4. Check Home Assistant server if restart did succeed (check log files, notifications and UI)
  5. When ok, merge develop into master and activate master on HA server

All this is handled by the scripts, available on my github page: https://github.com/eiri020/ha_updater

Any feedback is highly appreciated.

1 Like

Maybe this should be in #projects?