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

Update validate.py

This commit is contained in:
Pascal Vizeli
2018-02-18 12:23:46 +01:00
committed by GitHub
parent 699fcdafba
commit 8cb0b7c498

View File

@@ -30,7 +30,7 @@ SCHEMA_SNAPSHOT = vol.Schema({
vol.Required(ATTR_NAME): vol.Coerce(str),
vol.Required(ATTR_DATE): vol.Coerce(str),
vol.Inclusive(ATTR_PROTECTED, 'encrypted'):
vol.All(vol.Coerce(int), vol.Length(1)),
vol.All(vol.Coerce(int), vol.Length(min=1, max=1)),
vol.Inclusive(ATTR_CRYPTO, 'encrypted'): CRYPTO_AES128,
vol.Optional(ATTR_HOMEASSISTANT, default=dict): vol.Schema({
vol.Optional(ATTR_VERSION): vol.Coerce(str),