Add landingpage / cleanup homeassistant core handling

This commit is contained in:
pvizeli
2017-07-11 12:26:58 +02:00
parent a14917e017
commit 02c8baef68
7 changed files with 121 additions and 97 deletions

View File

@@ -1,6 +1,9 @@
"""Validate functions."""
import voluptuous as vol
from .const import ATTR_DEVICES, ATTR_IMAGE
NETWORK_PORT = vol.All(vol.Coerce(int), vol.Range(min=1, max=65535))
HASS_DEVICES = [vol.Match(r"^[^/]*$")]
@@ -30,3 +33,9 @@ DOCKER_PORTS = vol.Schema({
vol.All(vol.Coerce(str), vol.Match(r"^\d+(?:/tcp|/udp)?$")):
convert_to_docker_ports,
})
SCHEMA_HASS_CONFIG = vol.Schema({
vol.Optional(ATTR_DEVICES, default=[]): HASS_DEVICES,
vol.Optional(ATTR_IMAGE): vol.Coerce(str)
})