A Bash script to rebuild my Home Assistant YAML.
Download script to the root of your Home Assistant instance. Your milage may vary.
Rebuilding your YAML involves recreating your YAML files, alphabetizing your entity_ids and creating a list of all entity_ids from the YAML included in the folder.
Invoke script 'rebuild.sh' with folder you would like to rebuild. It will rebuild all YAML files and create a file titled 'entity_id.txt' in your home-assistant configuration fo.der.