From 4e94043bca4fe2a6fe57f393482ada9831569a01 Mon Sep 17 00:00:00 2001 From: carstenschroeder Date: Sun, 5 May 2019 23:25:56 +0200 Subject: [PATCH] Fix validation of image and last_version (#1073) * Fix validation of image and last_vesrion * use of Maybe --- hassio/api/homeassistant.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hassio/api/homeassistant.py b/hassio/api/homeassistant.py index 639bf76c1..4264fc682 100644 --- a/hassio/api/homeassistant.py +++ b/hassio/api/homeassistant.py @@ -41,8 +41,8 @@ _LOGGER = logging.getLogger(__name__) SCHEMA_OPTIONS = vol.Schema( { vol.Optional(ATTR_BOOT): vol.Boolean(), - vol.Inclusive(ATTR_IMAGE, "custom_hass"): vol.Maybe(vol.Coerce(str)), - vol.Inclusive(ATTR_LAST_VERSION, "custom_hass"): vol.Any(None, DOCKER_IMAGE), + vol.Inclusive(ATTR_IMAGE, "custom_hass"): vol.Maybe(DOCKER_IMAGE), + vol.Inclusive(ATTR_LAST_VERSION, "custom_hass"): vol.Maybe(vol.Coerce(str)), vol.Optional(ATTR_PORT): NETWORK_PORT, vol.Optional(ATTR_PASSWORD): vol.Maybe(vol.Coerce(str)), vol.Optional(ATTR_SSL): vol.Boolean(),