Keeping a test/staging environment for HA/hassio

I have a raspi running hassio as my primary Home Assistant instance. Twice, not once … twice, have I managed to fubar the config. The first time my editor wen’t bonkers and saved all yaml files as empty files with no undo, the second time I made a mistake and didn’t realise it until all editors were closed.

This has made me think. I want a “virtual” install of Home Assistant where I can make all adjustments, add new components, rearrange views etc. And when I’m satisfied, I “commit” this config to my production home-assistant instance.

Is anyone doing something like this? What is your workflow/setup?

1 Like

You should look into version control software like tortoiseHG. I make all my changes on my live system. If it ends up having no issues, i’ll push the changes to my repository. If the changes you make break your config, you just need to pull from your repository. Version control software also allows you to revert to any commit you’ve ever done. So you could always revert changes that cause the system that break components.

I have a virtualbox virtual machine running Lubuntu OS with HA installed. I do all my config editing on that and then transfer any changes across to my Pi using git. I actually go via an offsite host, but you could do it directly from the VM.

It works fine because I don’t have any directly connected hardware. Everything I connect to is through MQTT or web interfaces. Any differences from one installation to the other are kept in !secret files.