From 433c5cef3bd3078eefe40ca770d5bc0725d18cf4 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Fri, 23 Feb 2018 22:22:38 +0100 Subject: [PATCH] Stop home-assistant only if they will be restored (#377) --- hassio/snapshots/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hassio/snapshots/__init__.py b/hassio/snapshots/__init__.py index 02aabe67f..0cd2171bb 100644 --- a/hassio/snapshots/__init__.py +++ b/hassio/snapshots/__init__.py @@ -294,7 +294,8 @@ class SnapshotManager(CoreSysAttributes): await self.lock.acquire() async with snapshot: - if FOLDER_HOMEASSISTANT in folders: + # Stop Home-Assistant if they will be restored later + if homeassistant and FOLDER_HOMEASSISTANT in folders: await self._homeassistant.stop() # Process folders