From ae2fd149a50622ac37652dd42faf3b3ef6560f07 Mon Sep 17 00:00:00 2001 From: MartinHjelmare Date: Thu, 11 Feb 2016 21:03:13 +0100 Subject: [PATCH] Fix validate config in mysensors * Add check of port in config. --- homeassistant/components/mysensors.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/homeassistant/components/mysensors.py b/homeassistant/components/mysensors.py index b0c6f4c008c..49068ff1c2d 100644 --- a/homeassistant/components/mysensors.py +++ b/homeassistant/components/mysensors.py @@ -56,6 +56,11 @@ def setup(hass, config): {DOMAIN: [CONF_GATEWAYS]}, _LOGGER): return False + if not all(CONF_PORT in gateway + for gateway in config[DOMAIN][CONF_GATEWAYS]): + _LOGGER.error('Missing required configuration items ' + 'in %s: %s', DOMAIN, CONF_PORT) + return False import mysensors.mysensors as mysensors