From 7d2ab4fce6d86547bf61fe03feef593281a23d3b Mon Sep 17 00:00:00 2001 From: Jan Losinski Date: Thu, 10 Nov 2016 22:14:40 +0100 Subject: [PATCH] Change pilight systemcode validation to integer (#4286) * Change pilight systemcode validation to integer According to the pilight code the systemcode should be an integer and not a string (it is an int in the pilight code). Passing this as a string caused errors from pilight: "ERROR: elro_800_switch: insufficient number of arguments" This fixes #4282 * Change pilight unit-id to positive integer According to the pilight code the unit of an entity is also evrywhere handled as an integer. So converting and passing this as string causes pilight not to work. This fixes #4282 Signed-off-by: Jan Losinski --- homeassistant/components/switch/pilight.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/switch/pilight.py b/homeassistant/components/switch/pilight.py index f07d91ca9fb..80a36756d79 100644 --- a/homeassistant/components/switch/pilight.py +++ b/homeassistant/components/switch/pilight.py @@ -27,10 +27,10 @@ DEPENDENCIES = ['pilight'] COMMAND_SCHEMA = pilight.RF_CODE_SCHEMA.extend({ vol.Optional('on'): cv.positive_int, vol.Optional('off'): cv.positive_int, - vol.Optional(CONF_UNIT): cv.string, + vol.Optional(CONF_UNIT): cv.positive_int, vol.Optional(CONF_ID): cv.positive_int, vol.Optional(CONF_STATE): cv.string, - vol.Optional(CONF_SYSTEMCODE): cv.string, + vol.Optional(CONF_SYSTEMCODE): cv.positive_int, }) SWITCHES_SCHEMA = vol.Schema({