Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Set your paths below. Script can be run from any folder as long as your the right user and the drive is mounted.
# You can either include or exclude the database, incase you have mysql or simply don't want to backup a big file.
# Do check the storage on your drive.
BACKUP_FOLDER=/media/hassbackup/
BACKUP_FILE=${BACKUP_FOLDER}hass-config_$(date +"%Y%m%d_%H%M%S").zip
BACKUP_LOCATION=/home/homeassistant/.homeassistant
INCLUDE_DB=false
#!/home/joost/homeassistant/bin/python3
# This script will make sure that no entity in your openzwave config cache file has a duplicate name.
# It will also create a backup of the file.
import xml.etree.ElementTree as ET
import copy
import re
import time
from shutil import copyfile