Fix issue when reading worxlandroid pin code (#15930)

Fixes #14050
pull/15960/merge
Khalid 2018-08-14 12:55:40 +03:00 committed by Paulus Schoutsen
parent e3a2e58623
commit 800eb4d86a
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ DEFAULT_TIMEOUT = 5
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_HOST): cv.string,
vol.Required(CONF_PIN):
vol.All(vol.Coerce(int), vol.Range(min=1000, max=9999)),
vol.All(vol.Coerce(str), vol.Match(r'\d{4}')),
vol.Optional(CONF_ALLOW_UNREACHABLE, default=True): cv.boolean,
vol.Optional(CONF_TIMEOUT, default=DEFAULT_TIMEOUT): cv.positive_int,
})