From 9f4a3f4aeae8f3bcf0831ca220ee06fb875626b2 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 23 Oct 2015 22:57:07 +0200 Subject: [PATCH] Use the logger the same way as other platforms do --- homeassistant/components/switch/tellstick.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/switch/tellstick.py b/homeassistant/components/switch/tellstick.py index 20bfa295820..363de83fdfb 100644 --- a/homeassistant/components/switch/tellstick.py +++ b/homeassistant/components/switch/tellstick.py @@ -13,9 +13,10 @@ from homeassistant.const import (EVENT_HOMEASSISTANT_STOP, from homeassistant.helpers.entity import ToggleEntity import tellcore.constants as tellcore_constants from tellcore.library import DirectCallbackDispatcher -SINGAL_REPETITIONS = 1 +SINGAL_REPETITIONS = 1 REQUIREMENTS = ['tellcore-py==1.1.2'] +_LOGGER = logging.getLogger(__name__) # pylint: disable=unused-argument @@ -24,8 +25,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None): try: import tellcore.telldus as telldus except ImportError: - logging.getLogger(__name__).exception( - "Failed to import tellcore") + _LOGGER.exception("Failed to import tellcore") return core = telldus.TelldusCore(callback_dispatcher=DirectCallbackDispatcher())