Fix validate config in mysensors

* Add check of port in config.
This commit is contained in:
MartinHjelmare 2016-02-11 21:03:13 +01:00
parent 4ce1a67c13
commit ae2fd149a5

View file

@ -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