forked from home-assistant/core
Prevent device tracker error
This commit is contained in:
@@ -94,7 +94,7 @@ def setup(hass, config):
|
|||||||
yaml_path = hass.config.path(YAML_DEVICES)
|
yaml_path = hass.config.path(YAML_DEVICES)
|
||||||
|
|
||||||
conf = config.get(DOMAIN, {})
|
conf = config.get(DOMAIN, {})
|
||||||
if isinstance(conf, list):
|
if isinstance(conf, list) and len(conf) > 0:
|
||||||
conf = conf[0]
|
conf = conf[0]
|
||||||
consider_home = timedelta(
|
consider_home = timedelta(
|
||||||
seconds=util.convert(conf.get(CONF_CONSIDER_HOME), int,
|
seconds=util.convert(conf.get(CONF_CONSIDER_HOME), int,
|
||||||
|
Reference in New Issue
Block a user