Removed the check for callback_dispatcher
parent
7d0ff6884c
commit
e90fd3d654
|
@ -13,7 +13,6 @@ import tellcore.constants as tellcore_constants
|
||||||
from tellcore.library import DirectCallbackDispatcher
|
from tellcore.library import DirectCallbackDispatcher
|
||||||
REQUIREMENTS = ['tellcore-py==1.1.2']
|
REQUIREMENTS = ['tellcore-py==1.1.2']
|
||||||
|
|
||||||
|
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
def setup_platform(hass, config, add_devices_callback, discovery_info=None):
|
def setup_platform(hass, config, add_devices_callback, discovery_info=None):
|
||||||
""" Find and return Tellstick lights. """
|
""" Find and return Tellstick lights. """
|
||||||
|
@ -26,10 +25,10 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
|
||||||
return []
|
return []
|
||||||
|
|
||||||
# pylint: disable=no-member
|
# pylint: disable=no-member
|
||||||
if telldus.TelldusCore.callback_dispatcher is None:
|
#if telldus.TelldusCore.callback_dispatcher is None:
|
||||||
dispatcher = DirectCallbackDispatcher()
|
#dispatcher = DirectCallbackDispatcher()
|
||||||
core = telldus.TelldusCore(callback_dispatcher=dispatcher)
|
#core = telldus.TelldusCore(callback_dispatcher=dispatcher)
|
||||||
else:
|
#else:
|
||||||
core = telldus.TelldusCore()
|
core = telldus.TelldusCore()
|
||||||
|
|
||||||
switches_and_lights = core.devices()
|
switches_and_lights = core.devices()
|
||||||
|
|
|
@ -33,11 +33,11 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
|
||||||
return
|
return
|
||||||
|
|
||||||
# pylint: disable=no-member
|
# pylint: disable=no-member
|
||||||
if telldus.TelldusCore.callback_dispatcher is None:
|
#if telldus.TelldusCore.callback_dispatcher is None:
|
||||||
dispatcher = DirectCallbackDispatcher()
|
dispatcher = DirectCallbackDispatcher()
|
||||||
core = telldus.TelldusCore(callback_dispatcher=dispatcher)
|
core = telldus.TelldusCore(callback_dispatcher=dispatcher)
|
||||||
else:
|
#else:
|
||||||
core = telldus.TelldusCore()
|
# core = telldus.TelldusCore()
|
||||||
|
|
||||||
signal_repetitions = config.get('signal_repetitions', SINGAL_REPETITIONS)
|
signal_repetitions = config.get('signal_repetitions', SINGAL_REPETITIONS)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue