mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Prevent device tracker error
This commit is contained in:
parent
a862e994c7
commit
197388a9b2
@ -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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user