Move imports to top for switchbot (#29229)

pull/29236/head
springstan 2019-11-29 19:34:40 +01:00 committed by Daniel Høyer Iversen
parent e405398ca4
commit 04bad4bc74
1 changed files with 4 additions and 4 deletions

View File

@ -2,11 +2,13 @@
import logging
from typing import Any, Dict
# pylint: disable=import-error, no-member
import switchbot
import voluptuous as vol
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchDevice
from homeassistant.const import CONF_MAC, CONF_NAME
import homeassistant.helpers.config_validation as cv
from homeassistant.components.switch import SwitchDevice, PLATFORM_SCHEMA
from homeassistant.const import CONF_NAME, CONF_MAC
from homeassistant.helpers.restore_state import RestoreEntity
_LOGGER = logging.getLogger(__name__)
@ -33,8 +35,6 @@ class SwitchBot(SwitchDevice, RestoreEntity):
def __init__(self, mac, name) -> None:
"""Initialize the Switchbot."""
# pylint: disable=import-error, no-member
import switchbot
self._state = None
self._last_run_success = None