Test and Development Instance for HA

Hi, I have one instance of HASSIO running on an intel NUC which is production, test and development. As you can imagine that presents some difficulties when things don’t go according to plan.

So I am thinking of setting up a test and development instance for HA. But struggle to see how, without replicating every light and sensor on production that any code written in the test and development instance can reflect the production.

My current approach is likely to be set up the minimum number of sensors and lights to simulate production, develop and test new automations then amend the entities to reflect the production environment.

I wonder what others have done to solve this problem?

I have it on a NUC also

I make shore I have a good backup off the nuc that done at 6am each so I have 24 hours to break it and restore

Pretty much how I currently work, my config is stored on Github so I can back out changes that don’t work. But its a pain when I want to make significant changes to a part of the system.