Use constants (#5390)

This commit is contained in:
Fabian Affolter authored and GitHub committed 2017-01-17 23:40:34 +01:00
1 parent cfc936761b
commit bfc0a6a17c
3 files changed
+28 -16

No files matched your search

@@ -5,8 +5,11 @@ For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/switch.qwikswitch/
"""
import logging
import homeassistant.components.qwikswitch as qwikswitch
_LOGGER = logging.getLogger(__name__)
DEPENDENCIES = ['qwikswitch']
@@ -14,8 +17,7 @@ DEPENDENCIES = ['qwikswitch']
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Add switched from the main Qwikswitch component."""
if discovery_info is None:
logging.getLogger(__name__).error(
'Configure main Qwikswitch component')
_LOGGER.error("Configure Qwikswitch component")
return False
add_devices(qwikswitch.QSUSB['switch'])