mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Move imports to top for switchbot (#29229)
This commit is contained in:
parent
e405398ca4
commit
04bad4bc74
@ -2,11 +2,13 @@
|
|||||||
import logging
|
import logging
|
||||||
from typing import Any, Dict
|
from typing import Any, Dict
|
||||||
|
|
||||||
|
# pylint: disable=import-error, no-member
|
||||||
|
import switchbot
|
||||||
import voluptuous as vol
|
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
|
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
|
from homeassistant.helpers.restore_state import RestoreEntity
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
@ -33,8 +35,6 @@ class SwitchBot(SwitchDevice, RestoreEntity):
|
|||||||
|
|
||||||
def __init__(self, mac, name) -> None:
|
def __init__(self, mac, name) -> None:
|
||||||
"""Initialize the Switchbot."""
|
"""Initialize the Switchbot."""
|
||||||
# pylint: disable=import-error, no-member
|
|
||||||
import switchbot
|
|
||||||
|
|
||||||
self._state = None
|
self._state = None
|
||||||
self._last_run_success = None
|
self._last_run_success = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user