When making changes to Home Assistant, there’s always a risk of breaking it. However, experimenting in a safe environment won’t stop you from trying new things. Instead, create a duplicate instance that can be easily restored from a backup.
Testing on your live instance isn’t the best option due to potential difficulties in reverting changes and getting back to a working state. This is where setting up a sandbox comes in – a separate instance of Home Assistant that replicates your current system. You can experiment with automations, devices, or new configurations without risking your main instance.
To set up a sandbox, consider using an old device like a Raspberry Pi or an empty virtual machine on the same hardware as your live version. Alternatively, you can create another virtual machine or container and restore an identical backup of Home Assistant from your live system.
Restoring a backup to your sandbox is a straightforward process: take a manual backup of your current instance, download it, and then restore it in your sandbox using “Upload backup” on the Welcome screen. This will give you a working clone that you can experiment with safely.
While sandboxes provide a level of protection, they’re not perfect. Be aware that some hardware configurations or peripherals might not work correctly in your sandboxed instance. However, this is acceptable if it’s just for quick experimentation purposes – after all, you don’t need a perfect replica to test an automation or device that doesn’t rely on specific hardware.
By using sandboxes to test Home Assistant, you can avoid breaking your main instance and experiment with new features without worrying about consequences.
Source: https://www.howtogeek.com/essential-home-assistant-trick-saves-you-from-ruining-your-smart-home