fix issue where sensors and switches were duplicated because of component getting initialized twice. closes #913

This commit is contained in:
Erik committed 2016-01-18 19:41:41 +01:00
1 parent 7ac648d0ab
commit d43101f22a
2 files changed
+4 -2

No files matched your search

@@ -15,11 +15,12 @@ from homeassistant.components import tellduslive
from homeassistant.helpers.entity import ToggleEntity
_LOGGER = logging.getLogger(__name__)
DEPENDENCIES = ['tellduslive']
def setup_platform(hass, config, add_devices, discovery_info=None):
""" Find and return Tellstick switches. """
if discovery_info is None:
return
switches = tellduslive.NETWORK.get_switches()
add_devices([TelldusLiveSwitch(switch["name"],
switch["id"])