1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-24 12:29:08 +00:00

Add cleanup

This commit is contained in:
pvizeli
2017-04-18 16:20:19 +02:00
parent 454d82d985
commit c9876988da
4 changed files with 45 additions and 14 deletions

View File

@@ -14,6 +14,7 @@ HOMEASSISTANT_CURRENT = 'homeassistant_current'
HASSIO_SSL = "{}/ssl"
HASSIO_CURRENT = 'hassio_current'
HASSIO_CLEANUP = 'hassio_cleanup'
ADDONS_REPO = "{}/addons"
ADDONS_DATA = "{}/addons_data"
@@ -87,6 +88,20 @@ class CoreConfig(Config):
"""Set beta upstream mode."""
self._data[UPSTREAM_BETA] = bool(value)
@property
def cleanup_hassio(self):
"""Return Version they need to cleanup."""
return self._data.get(HASSIO_CLEANUP)
@cleanup_hassio.setter
def cleanup_hassio(self, version):
"""Set or remove cleanup flag."""
if version is None:
self._data.pop(HASSIO_CLEANUP, None)
else:
self._data[HASSIO_CLEANUP] = version
self.save()
@property
def homeassistant_image(self):
"""Return docker homeassistant repository."""