mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
Removed the check for callback_dispatcher
This commit is contained in:
parent
16c2827465
commit
b4ca691822
@ -24,12 +24,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
|
||||
"Failed to import tellcore")
|
||||
return []
|
||||
|
||||
# pylint: disable=no-member
|
||||
#if telldus.TelldusCore.callback_dispatcher is None:
|
||||
#dispatcher = DirectCallbackDispatcher()
|
||||
#core = telldus.TelldusCore(callback_dispatcher=dispatcher)
|
||||
#else:
|
||||
core = telldus.TelldusCore()
|
||||
core = telldus.TelldusCore(callback_dispatcher=DirectCallbackDispatcher())
|
||||
|
||||
switches_and_lights = core.devices()
|
||||
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)
|
||||
|
||||
def unload_telldus_lib():
|
||||
def unload_telldus_lib(event):
|
||||
if callback_id is not None:
|
||||
core.unregister_callback(callback_id)
|
||||
|
||||
|
@ -32,12 +32,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
|
||||
"Failed to import tellcore")
|
||||
return
|
||||
|
||||
# pylint: disable=no-member
|
||||
#if telldus.TelldusCore.callback_dispatcher is None:
|
||||
dispatcher = DirectCallbackDispatcher()
|
||||
core = telldus.TelldusCore(callback_dispatcher=dispatcher)
|
||||
#else:
|
||||
# core = telldus.TelldusCore()
|
||||
core = telldus.TelldusCore(callback_dispatcher=DirectCallbackDispatcher())
|
||||
|
||||
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)
|
||||
|
||||
def unload_telldus_lib():
|
||||
def unload_telldus_lib(event):
|
||||
if callback_id is not None:
|
||||
core.unregister_callback(callback_id)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user