Removed the check for callback_dispatcher

This commit is contained in:
Stefan Jonasson 2015-09-23 09:43:16 +02:00
parent 7d0ff6884c
commit e90fd3d654
2 changed files with 9 additions and 10 deletions

View file

@ -13,7 +13,6 @@ import tellcore.constants as tellcore_constants
from tellcore.library import DirectCallbackDispatcher
REQUIREMENTS = ['tellcore-py==1.1.2']
# pylint: disable=unused-argument
def setup_platform(hass, config, add_devices_callback, discovery_info=None):
""" Find and return Tellstick lights. """
@ -26,11 +25,11 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
return []
# pylint: disable=no-member
if telldus.TelldusCore.callback_dispatcher is None:
dispatcher = DirectCallbackDispatcher()
core = telldus.TelldusCore(callback_dispatcher=dispatcher)
else:
core = telldus.TelldusCore()
#if telldus.TelldusCore.callback_dispatcher is None:
#dispatcher = DirectCallbackDispatcher()
#core = telldus.TelldusCore(callback_dispatcher=dispatcher)
#else:
core = telldus.TelldusCore()
switches_and_lights = core.devices()
lights = []

View file

@ -33,11 +33,11 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
return
# pylint: disable=no-member
if telldus.TelldusCore.callback_dispatcher is None:
#if telldus.TelldusCore.callback_dispatcher is None:
dispatcher = DirectCallbackDispatcher()
core = telldus.TelldusCore(callback_dispatcher=dispatcher)
else:
core = telldus.TelldusCore()
core = telldus.TelldusCore(callback_dispatcher=dispatcher)
#else:
# core = telldus.TelldusCore()
signal_repetitions = config.get('signal_repetitions', SINGAL_REPETITIONS)