Move imports to top for switchbot (#29229)
parent
e405398ca4
commit
04bad4bc74
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue