Core support for hass.io calls & Bugfix check_config (#11571)

* Initial overwrites

* Add check_config function.

* Update hassio.py

* Address comments

* add hassio support

* add more tests

* revert core changes

* Address check_config

* Address comment with api_bool

* Bugfix check_config

* Update core.py

* Update test_core.py

* Update config.py

* Update hassio.py

* Update config.py

* Update test_config.py
This commit is contained in:
Pascal Vizeli authored and GitHub committed 2018-01-12 15:29:58 +01:00
1 parent 8a301c6c59
commit dacd7cd8a4
6 files changed
+179 -17

No files matched your search

+7
View File
@@ -97,9 +97,15 @@ def async_setup(hass, config):
newest, releasenotes = result
# Skip on dev
if newest is None or 'dev' in current_version:
return
# Load data from supervisor on hass.io
if hass.components.hassio.is_hassio():
newest = hass.components.hassio.get_homeassistant_version()
# Validate version
if StrictVersion(newest) > StrictVersion(current_version):
_LOGGER.info("The latest available version is %s", newest)
hass.states.async_set(
@@ -131,6 +137,7 @@ def get_system_info(hass, include_components):
'timezone': dt_util.DEFAULT_TIME_ZONE.zone,
'version': current_version,
'virtualenv': os.environ.get('VIRTUAL_ENV') is not None,
'hassio': hass.components.hassio.is_hassio(),
}
if include_components: