Fixed device tracker to install scanner requirements.

pull/299/head
Ryan Kraus 2015-08-30 20:22:02 -04:00 committed by Paulus Schoutsen
parent 0987a84bf4
commit 83440ad718
1 changed files with 4 additions and 3 deletions

View File

@ -15,6 +15,7 @@ from homeassistant.helpers import validate_config
from homeassistant.helpers.entity import _OVERWRITE from homeassistant.helpers.entity import _OVERWRITE
import homeassistant.util as util import homeassistant.util as util
import homeassistant.util.dt as dt_util import homeassistant.util.dt as dt_util
from homeassistant.bootstrap import prepare_setup_platform
from homeassistant.helpers.event import track_utc_time_change from homeassistant.helpers.event import track_utc_time_change
from homeassistant.const import ( from homeassistant.const import (
@ -62,9 +63,9 @@ def setup(hass, config):
return False return False
tracker_type = config[DOMAIN].get(CONF_PLATFORM) tracker_type = config[DOMAIN].get(CONF_PLATFORM)
tracker_implementation = get_component( tracker_implementation = \
'device_tracker.{}'.format(tracker_type)) prepare_setup_platform(hass, config, DOMAIN, tracker_type)
if tracker_implementation is None: if tracker_implementation is None:
_LOGGER.error("Unknown device_tracker type specified: %s.", _LOGGER.error("Unknown device_tracker type specified: %s.",