From e90fd3d654655d0722e51fa39ccc77d9eed2375c Mon Sep 17 00:00:00 2001 From: Stefan Jonasson Date: Wed, 23 Sep 2015 09:43:16 +0200 Subject: [PATCH] Removed the check for callback_dispatcher --- homeassistant/components/light/tellstick.py | 11 +++++------ homeassistant/components/switch/tellstick.py | 8 ++++---- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/homeassistant/components/light/tellstick.py b/homeassistant/components/light/tellstick.py index 1bb60898dd3..626b7a9be33 100644 --- a/homeassistant/components/light/tellstick.py +++ b/homeassistant/components/light/tellstick.py @@ -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 = [] diff --git a/homeassistant/components/switch/tellstick.py b/homeassistant/components/switch/tellstick.py index ed8214f3e1c..ea269468270 100644 --- a/homeassistant/components/switch/tellstick.py +++ b/homeassistant/components/switch/tellstick.py @@ -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)