diff --git a/homeassistant/components/orvibo/switch.py b/homeassistant/components/orvibo/switch.py index 38d0d2c05d4..75a95e053ae 100644 --- a/homeassistant/components/orvibo/switch.py +++ b/homeassistant/components/orvibo/switch.py @@ -1,15 +1,16 @@ """Support for Orvibo S20 Wifi Smart Switches.""" import logging +from orvibo.s20 import S20, S20Exception, discover import voluptuous as vol -from homeassistant.components.switch import SwitchDevice, PLATFORM_SCHEMA +from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchDevice from homeassistant.const import ( + CONF_DISCOVERY, CONF_HOST, + CONF_MAC, CONF_NAME, CONF_SWITCHES, - CONF_MAC, - CONF_DISCOVERY, ) import homeassistant.helpers.config_validation as cv @@ -37,7 +38,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( def setup_platform(hass, config, add_entities_callback, discovery_info=None): """Set up S20 switches.""" - from orvibo.s20 import discover, S20, S20Exception switch_data = {} switches = [] @@ -67,7 +67,6 @@ class S20Switch(SwitchDevice): def __init__(self, name, s20): """Initialize the S20 device.""" - from orvibo.s20 import S20Exception self._name = name self._s20 = s20