diff --git a/homeassistant/components/light/tellstick.py b/homeassistant/components/light/tellstick.py index 0791cf8120a..dd2f9a39a4e 100644 --- a/homeassistant/components/light/tellstick.py +++ b/homeassistant/components/light/tellstick.py @@ -6,13 +6,13 @@ Support for Tellstick lights. import logging # pylint: disable=no-name-in-module, import-error from homeassistant.components.light import Light, ATTR_BRIGHTNESS -from homeassistant.const import ( - EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP, - ATTR_FRIENDLY_NAME) +from homeassistant.const import ( EVENT_HOMEASSISTANT_STOP, + ATTR_FRIENDLY_NAME) 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. """ @@ -44,6 +44,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(event): + """ Un-register the callback bindings """ if callback_id is not None: core.unregister_callback(callback_id) diff --git a/homeassistant/components/switch/tellstick.py b/homeassistant/components/switch/tellstick.py index ab9f819501b..1a0f7097b52 100644 --- a/homeassistant/components/switch/tellstick.py +++ b/homeassistant/components/switch/tellstick.py @@ -11,9 +11,8 @@ signal_repetitions: 3 """ import logging -from homeassistant.const import ( - EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP, - ATTR_FRIENDLY_NAME) +from homeassistant.const import (EVENT_HOMEASSISTANT_STOP, + ATTR_FRIENDLY_NAME) from homeassistant.helpers.entity import ToggleEntity import tellcore.constants as tellcore_constants from tellcore.library import DirectCallbackDispatcher @@ -55,6 +54,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(event): + """ Un-register the callback bindings """ if callback_id is not None: core.unregister_callback(callback_id)