Removed the check for callback_dispatcher
This commit is contained in:
1 parent
16c2827465
commit
b4ca691822
2 files changed
+4
-14
No files matched your search
@@ -24,12 +24,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
|
|||||||
"Failed to import tellcore")
|
"Failed to import tellcore")
|
||||||
return []
|
return []
|
||||||
|
|
||||||
# pylint: disable=no-member
|
core = telldus.TelldusCore(callback_dispatcher=DirectCallbackDispatcher())
|
||||||
#if telldus.TelldusCore.callback_dispatcher is None:
|
|
||||||
#dispatcher = DirectCallbackDispatcher()
|
|
||||||
#core = telldus.TelldusCore(callback_dispatcher=dispatcher)
|
|
||||||
#else:
|
|
||||||
core = telldus.TelldusCore()
|
|
||||||
|
|
||||||
switches_and_lights = core.devices()
|
switches_and_lights = core.devices()
|
||||||
lights = []
|
lights = []
|
||||||
@@ -48,7 +43,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
|
|||||||
|
|
||||||
callback_id = core.register_device_event(_device_event_callback)
|
callback_id = core.register_device_event(_device_event_callback)
|
||||||
|
|
||||||
def unload_telldus_lib():
|
def unload_telldus_lib(event):
|
||||||
if callback_id is not None:
|
if callback_id is not None:
|
||||||
core.unregister_callback(callback_id)
|
core.unregister_callback(callback_id)
|
||||||
|
|
||||||
|
|||||||
@@ -32,12 +32,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
|
|||||||
"Failed to import tellcore")
|
"Failed to import tellcore")
|
||||||
return
|
return
|
||||||
|
|
||||||
# pylint: disable=no-member
|
core = telldus.TelldusCore(callback_dispatcher=DirectCallbackDispatcher())
|
||||||
#if telldus.TelldusCore.callback_dispatcher is None:
|
|
||||||
dispatcher = DirectCallbackDispatcher()
|
|
||||||
core = telldus.TelldusCore(callback_dispatcher=dispatcher)
|
|
||||||
#else:
|
|
||||||
# core = telldus.TelldusCore()
|
|
||||||
|
|
||||||
signal_repetitions = config.get('signal_repetitions', SINGAL_REPETITIONS)
|
signal_repetitions = config.get('signal_repetitions', SINGAL_REPETITIONS)
|
||||||
|
|
||||||
@@ -60,7 +55,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
|
|||||||
|
|
||||||
callback_id = core.register_device_event(_device_event_callback)
|
callback_id = core.register_device_event(_device_event_callback)
|
||||||
|
|
||||||
def unload_telldus_lib():
|
def unload_telldus_lib(event):
|
||||||
if callback_id is not None:
|
if callback_id is not None:
|
||||||
core.unregister_callback(callback_id)
|
core.unregister_callback(callback_id)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user