Add storage helper and migrate config entries (#15045)

* Add storage helper

* Migrate config entries to use the storage helper

* Make sure tests do not do I/O

* Lint

* Add versions to stored data

* Add more instance variables

* Make migrator load config if nothing to migrate

* Address comments
This commit is contained in:
Paulus Schoutsen 2018-06-25 12:53:49 -04:00 committed by GitHub
parent 672a3c7178
commit ae51dc08bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 384 additions and 46 deletions

View file

@ -225,7 +225,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
hass, config, add_devices, config_path, discovery_info=None)
return False
else:
config_file = save_json(config_path, DEFAULT_CONFIG)
save_json(config_path, DEFAULT_CONFIG)
request_app_setup(
hass, config, add_devices, config_path, discovery_info=None)
return False