mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
- Without new HTTP configuration mechanism, proper configuration of HA fails. This is because we don't setup the configuration before starting Home Assistant. Home Assistant only migrates the old configuration to new configuration format only on the first run. It also leaves a "repair" message to the user asking them to remove the 'http' section from the configuration file. - Write to the internal storage format of HA after verifying the version of the format. Writing through API is hindered by the lack of an API token (which apparently can't be obtained pragmatically). Tests: - Install without patches. configuration.yml contains http section. Home Assistant not work as HTTP configuration is not set. Apply patches and restart the service. The setup is run again. 'http' section in configuration.yml is removed. /var/lib/home-assistant-freedombox/config/.storage/http contains the required configuration keys with proper values. Home Assistant works (after domain selection). - Install freshly with patches. configuration.yml does not contain 'http' section. /var/lib/home-assistant-freedombox/config/ contains the necessary configuration changes. HA works after domain selection. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>