mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 08:17:08 +00:00
Move imports to top for thinkingcleaner (#29110)
This commit is contained in:
parent
23d4445de3
commit
c221fc5d22
@ -1,6 +1,8 @@
|
|||||||
"""Support for ThinkingCleaner sensors."""
|
"""Support for ThinkingCleaner sensors."""
|
||||||
import logging
|
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
import logging
|
||||||
|
|
||||||
|
from pythinkingcleaner import Discovery
|
||||||
|
|
||||||
from homeassistant import util
|
from homeassistant import util
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
@ -46,7 +48,6 @@ STATES = {
|
|||||||
|
|
||||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||||
"""Set up the ThinkingCleaner platform."""
|
"""Set up the ThinkingCleaner platform."""
|
||||||
from pythinkingcleaner import Discovery
|
|
||||||
|
|
||||||
discovery = Discovery()
|
discovery = Discovery()
|
||||||
devices = discovery.discover()
|
devices = discovery.discover()
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
"""Support for ThinkingCleaner switches."""
|
"""Support for ThinkingCleaner switches."""
|
||||||
import time
|
|
||||||
import logging
|
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
import logging
|
||||||
|
import time
|
||||||
|
|
||||||
|
from pythinkingcleaner import Discovery
|
||||||
|
|
||||||
from homeassistant import util
|
from homeassistant import util
|
||||||
from homeassistant.const import STATE_ON, STATE_OFF
|
from homeassistant.const import STATE_OFF, STATE_ON
|
||||||
from homeassistant.helpers.entity import ToggleEntity
|
from homeassistant.helpers.entity import ToggleEntity
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
@ -24,7 +26,6 @@ SWITCH_TYPES = {
|
|||||||
|
|
||||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||||
"""Set up the ThinkingCleaner platform."""
|
"""Set up the ThinkingCleaner platform."""
|
||||||
from pythinkingcleaner import Discovery
|
|
||||||
|
|
||||||
discovery = Discovery()
|
discovery = Discovery()
|
||||||
devices = discovery.discover()
|
devices = discovery.discover()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user