mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 02:07:09 +00:00
use isort to sort imports according to PEP8 for demo (#29630)
This commit is contained in:
parent
a3b605bb7d
commit
e4e9cdce73
@ -4,8 +4,8 @@ import logging
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
from homeassistant import bootstrap, config_entries
|
from homeassistant import bootstrap, config_entries
|
||||||
import homeassistant.core as ha
|
|
||||||
from homeassistant.const import ATTR_ENTITY_ID, EVENT_HOMEASSISTANT_START
|
from homeassistant.const import ATTR_ENTITY_ID, EVENT_HOMEASSISTANT_START
|
||||||
|
import homeassistant.core as ha
|
||||||
|
|
||||||
DOMAIN = "demo"
|
DOMAIN = "demo"
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
"""Demo platform that has two fake binary sensors."""
|
"""Demo platform that has two fake binary sensors."""
|
||||||
from homeassistant.components.binary_sensor import BinarySensorDevice
|
from homeassistant.components.binary_sensor import BinarySensorDevice
|
||||||
|
|
||||||
from . import DOMAIN
|
from . import DOMAIN
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
"""Demo platform that has two fake binary sensors."""
|
"""Demo platform that has two fake binary sensors."""
|
||||||
import copy
|
import copy
|
||||||
|
|
||||||
import homeassistant.util.dt as dt_util
|
|
||||||
|
|
||||||
from homeassistant.components.calendar import CalendarEventDevice, get_date
|
from homeassistant.components.calendar import CalendarEventDevice, get_date
|
||||||
|
import homeassistant.util.dt as dt_util
|
||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
"""Demo platform that offers a fake climate device."""
|
"""Demo platform that offers a fake climate device."""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from homeassistant.components.climate import ClimateDevice
|
from homeassistant.components.climate import ClimateDevice
|
||||||
from homeassistant.components.climate.const import (
|
from homeassistant.components.climate.const import (
|
||||||
ATTR_TARGET_TEMP_HIGH,
|
ATTR_TARGET_TEMP_HIGH,
|
||||||
ATTR_TARGET_TEMP_LOW,
|
ATTR_TARGET_TEMP_LOW,
|
||||||
CURRENT_HVAC_COOL,
|
CURRENT_HVAC_COOL,
|
||||||
CURRENT_HVAC_HEAT,
|
CURRENT_HVAC_HEAT,
|
||||||
|
HVAC_MODE_AUTO,
|
||||||
HVAC_MODE_COOL,
|
HVAC_MODE_COOL,
|
||||||
HVAC_MODE_HEAT,
|
HVAC_MODE_HEAT,
|
||||||
HVAC_MODE_HEAT_COOL,
|
HVAC_MODE_HEAT_COOL,
|
||||||
@ -18,9 +20,9 @@ from homeassistant.components.climate.const import (
|
|||||||
SUPPORT_TARGET_HUMIDITY,
|
SUPPORT_TARGET_HUMIDITY,
|
||||||
SUPPORT_TARGET_TEMPERATURE,
|
SUPPORT_TARGET_TEMPERATURE,
|
||||||
SUPPORT_TARGET_TEMPERATURE_RANGE,
|
SUPPORT_TARGET_TEMPERATURE_RANGE,
|
||||||
HVAC_MODE_AUTO,
|
|
||||||
)
|
)
|
||||||
from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS, TEMP_FAHRENHEIT
|
from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS, TEMP_FAHRENHEIT
|
||||||
|
|
||||||
from . import DOMAIN
|
from . import DOMAIN
|
||||||
|
|
||||||
SUPPORT_FLAGS = 0
|
SUPPORT_FLAGS = 0
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
"""Demo platform for the cover component."""
|
"""Demo platform for the cover component."""
|
||||||
from homeassistant.helpers.event import track_utc_time_change
|
|
||||||
|
|
||||||
from homeassistant.components.cover import (
|
from homeassistant.components.cover import (
|
||||||
ATTR_POSITION,
|
ATTR_POSITION,
|
||||||
ATTR_TILT_POSITION,
|
ATTR_TILT_POSITION,
|
||||||
@ -8,6 +6,8 @@ from homeassistant.components.cover import (
|
|||||||
SUPPORT_OPEN,
|
SUPPORT_OPEN,
|
||||||
CoverDevice,
|
CoverDevice,
|
||||||
)
|
)
|
||||||
|
from homeassistant.helpers.event import track_utc_time_change
|
||||||
|
|
||||||
from . import DOMAIN
|
from . import DOMAIN
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
"""Demo fan platform that has a fake fan."""
|
"""Demo fan platform that has a fake fan."""
|
||||||
from homeassistant.const import STATE_OFF
|
|
||||||
|
|
||||||
from homeassistant.components.fan import (
|
from homeassistant.components.fan import (
|
||||||
SPEED_HIGH,
|
SPEED_HIGH,
|
||||||
SPEED_LOW,
|
SPEED_LOW,
|
||||||
@ -10,6 +8,7 @@ from homeassistant.components.fan import (
|
|||||||
SUPPORT_SET_SPEED,
|
SUPPORT_SET_SPEED,
|
||||||
FanEntity,
|
FanEntity,
|
||||||
)
|
)
|
||||||
|
from homeassistant.const import STATE_OFF
|
||||||
|
|
||||||
FULL_SUPPORT = SUPPORT_SET_SPEED | SUPPORT_OSCILLATE | SUPPORT_DIRECTION
|
FULL_SUPPORT = SUPPORT_SET_SPEED | SUPPORT_OSCILLATE | SUPPORT_DIRECTION
|
||||||
LIMITED_SUPPORT = SUPPORT_SET_SPEED
|
LIMITED_SUPPORT = SUPPORT_SET_SPEED
|
||||||
|
@ -5,9 +5,8 @@ from math import cos, pi, radians, sin
|
|||||||
import random
|
import random
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from homeassistant.helpers.event import track_time_interval
|
|
||||||
|
|
||||||
from homeassistant.components.geo_location import GeolocationEvent
|
from homeassistant.components.geo_location import GeolocationEvent
|
||||||
|
from homeassistant.helpers.event import track_time_interval
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"""Support for the demo image processing."""
|
"""Support for the demo image processing."""
|
||||||
from homeassistant.components.image_processing import (
|
from homeassistant.components.image_processing import (
|
||||||
ImageProcessingFaceEntity,
|
|
||||||
ATTR_CONFIDENCE,
|
|
||||||
ATTR_NAME,
|
|
||||||
ATTR_AGE,
|
ATTR_AGE,
|
||||||
|
ATTR_CONFIDENCE,
|
||||||
ATTR_GENDER,
|
ATTR_GENDER,
|
||||||
|
ATTR_NAME,
|
||||||
|
ImageProcessingFaceEntity,
|
||||||
)
|
)
|
||||||
from homeassistant.components.openalpr_local.image_processing import (
|
from homeassistant.components.openalpr_local.image_processing import (
|
||||||
ImageProcessingAlprEntity,
|
ImageProcessingAlprEntity,
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
"""Demo lock platform that has two fake locks."""
|
"""Demo lock platform that has two fake locks."""
|
||||||
from homeassistant.const import STATE_LOCKED, STATE_UNLOCKED
|
|
||||||
|
|
||||||
from homeassistant.components.lock import SUPPORT_OPEN, LockDevice
|
from homeassistant.components.lock import SUPPORT_OPEN, LockDevice
|
||||||
|
from homeassistant.const import STATE_LOCKED, STATE_UNLOCKED
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
|
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
"""Demo platform that has a couple of fake sensors."""
|
"""Demo platform that has a couple of fake sensors."""
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
ATTR_BATTERY_LEVEL,
|
ATTR_BATTERY_LEVEL,
|
||||||
TEMP_CELSIUS,
|
|
||||||
DEVICE_CLASS_HUMIDITY,
|
DEVICE_CLASS_HUMIDITY,
|
||||||
DEVICE_CLASS_TEMPERATURE,
|
DEVICE_CLASS_TEMPERATURE,
|
||||||
|
TEMP_CELSIUS,
|
||||||
)
|
)
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
|
|
||||||
from . import DOMAIN
|
from . import DOMAIN
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
"""Demo platform that has two fake switches."""
|
"""Demo platform that has two fake switches."""
|
||||||
from homeassistant.components.switch import SwitchDevice
|
from homeassistant.components.switch import SwitchDevice
|
||||||
from homeassistant.const import DEVICE_DEFAULT_NAME
|
from homeassistant.const import DEVICE_DEFAULT_NAME
|
||||||
|
|
||||||
from . import DOMAIN
|
from . import DOMAIN
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
"""Demo platform that offers a fake water heater device."""
|
"""Demo platform that offers a fake water heater device."""
|
||||||
from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS, TEMP_FAHRENHEIT
|
|
||||||
|
|
||||||
from homeassistant.components.water_heater import (
|
from homeassistant.components.water_heater import (
|
||||||
SUPPORT_AWAY_MODE,
|
SUPPORT_AWAY_MODE,
|
||||||
SUPPORT_OPERATION_MODE,
|
SUPPORT_OPERATION_MODE,
|
||||||
SUPPORT_TARGET_TEMPERATURE,
|
SUPPORT_TARGET_TEMPERATURE,
|
||||||
WaterHeaterDevice,
|
WaterHeaterDevice,
|
||||||
)
|
)
|
||||||
|
from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS, TEMP_FAHRENHEIT
|
||||||
|
|
||||||
SUPPORT_FLAGS_HEATER = (
|
SUPPORT_FLAGS_HEATER = (
|
||||||
SUPPORT_TARGET_TEMPERATURE | SUPPORT_OPERATION_MODE | SUPPORT_AWAY_MODE
|
SUPPORT_TARGET_TEMPERATURE | SUPPORT_OPERATION_MODE | SUPPORT_AWAY_MODE
|
||||||
|
@ -4,7 +4,7 @@ from unittest.mock import mock_open, patch
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from homeassistant.components import camera
|
from homeassistant.components import camera
|
||||||
from homeassistant.components.camera import STATE_STREAMING, STATE_IDLE
|
from homeassistant.components.camera import STATE_IDLE, STATE_STREAMING
|
||||||
from homeassistant.exceptions import HomeAssistantError
|
from homeassistant.exceptions import HomeAssistantError
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
|
@ -4,29 +4,29 @@ from datetime import timedelta
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from homeassistant.components.cover import (
|
from homeassistant.components.cover import (
|
||||||
ATTR_POSITION,
|
|
||||||
ATTR_CURRENT_POSITION,
|
ATTR_CURRENT_POSITION,
|
||||||
ATTR_CURRENT_TILT_POSITION,
|
ATTR_CURRENT_TILT_POSITION,
|
||||||
|
ATTR_POSITION,
|
||||||
ATTR_TILT_POSITION,
|
ATTR_TILT_POSITION,
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
)
|
)
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
ATTR_ENTITY_ID,
|
ATTR_ENTITY_ID,
|
||||||
ATTR_SUPPORTED_FEATURES,
|
ATTR_SUPPORTED_FEATURES,
|
||||||
STATE_OPEN,
|
|
||||||
STATE_OPENING,
|
|
||||||
STATE_CLOSED,
|
|
||||||
STATE_CLOSING,
|
|
||||||
SERVICE_TOGGLE,
|
|
||||||
SERVICE_CLOSE_COVER,
|
SERVICE_CLOSE_COVER,
|
||||||
SERVICE_CLOSE_COVER_TILT,
|
SERVICE_CLOSE_COVER_TILT,
|
||||||
SERVICE_TOGGLE_COVER_TILT,
|
|
||||||
SERVICE_OPEN_COVER,
|
SERVICE_OPEN_COVER,
|
||||||
SERVICE_OPEN_COVER_TILT,
|
SERVICE_OPEN_COVER_TILT,
|
||||||
SERVICE_SET_COVER_POSITION,
|
SERVICE_SET_COVER_POSITION,
|
||||||
SERVICE_SET_COVER_TILT_POSITION,
|
SERVICE_SET_COVER_TILT_POSITION,
|
||||||
SERVICE_STOP_COVER,
|
SERVICE_STOP_COVER,
|
||||||
SERVICE_STOP_COVER_TILT,
|
SERVICE_STOP_COVER_TILT,
|
||||||
|
SERVICE_TOGGLE,
|
||||||
|
SERVICE_TOGGLE_COVER_TILT,
|
||||||
|
STATE_CLOSED,
|
||||||
|
STATE_CLOSING,
|
||||||
|
STATE_OPEN,
|
||||||
|
STATE_OPENING,
|
||||||
)
|
)
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
import homeassistant.util.dt as dt_util
|
import homeassistant.util.dt as dt_util
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""Test cases around the demo fan platform."""
|
"""Test cases around the demo fan platform."""
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from homeassistant.setup import async_setup_component
|
|
||||||
from homeassistant.components import fan
|
from homeassistant.components import fan
|
||||||
from homeassistant.const import STATE_OFF, STATE_ON
|
from homeassistant.const import STATE_OFF, STATE_ON
|
||||||
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
from tests.components.fan import common
|
from tests.components.fan import common
|
||||||
|
|
||||||
|
@ -4,17 +4,18 @@ from unittest.mock import patch
|
|||||||
|
|
||||||
from homeassistant.components import geo_location
|
from homeassistant.components import geo_location
|
||||||
from homeassistant.components.demo.geo_location import (
|
from homeassistant.components.demo.geo_location import (
|
||||||
NUMBER_OF_DEMO_DEVICES,
|
|
||||||
DEFAULT_UNIT_OF_MEASUREMENT,
|
DEFAULT_UNIT_OF_MEASUREMENT,
|
||||||
DEFAULT_UPDATE_INTERVAL,
|
DEFAULT_UPDATE_INTERVAL,
|
||||||
|
NUMBER_OF_DEMO_DEVICES,
|
||||||
)
|
)
|
||||||
from homeassistant.setup import setup_component
|
from homeassistant.setup import setup_component
|
||||||
|
import homeassistant.util.dt as dt_util
|
||||||
|
|
||||||
from tests.common import (
|
from tests.common import (
|
||||||
get_test_home_assistant,
|
|
||||||
assert_setup_component,
|
assert_setup_component,
|
||||||
fire_time_changed,
|
fire_time_changed,
|
||||||
|
get_test_home_assistant,
|
||||||
)
|
)
|
||||||
import homeassistant.util.dt as dt_util
|
|
||||||
|
|
||||||
CONFIG = {geo_location.DOMAIN: [{"platform": "demo"}]}
|
CONFIG = {geo_location.DOMAIN: [{"platform": "demo"}]}
|
||||||
|
|
||||||
|
@ -4,10 +4,10 @@ import os
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from homeassistant.setup import async_setup_component
|
|
||||||
from homeassistant.components import demo
|
from homeassistant.components import demo
|
||||||
from homeassistant.components.device_tracker.legacy import YAML_DEVICES
|
from homeassistant.components.device_tracker.legacy import YAML_DEVICES
|
||||||
from homeassistant.helpers.json import JSONEncoder
|
from homeassistant.helpers.json import JSONEncoder
|
||||||
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
"""The tests for the demo light component."""
|
"""The tests for the demo light component."""
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from homeassistant.setup import async_setup_component
|
|
||||||
from homeassistant.components import light
|
from homeassistant.components import light
|
||||||
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
from tests.components.light import common
|
from tests.components.light import common
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
"""The tests for the Demo lock platform."""
|
"""The tests for the Demo lock platform."""
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from homeassistant.setup import setup_component
|
|
||||||
from homeassistant.components import lock
|
from homeassistant.components import lock
|
||||||
|
from homeassistant.setup import setup_component
|
||||||
|
|
||||||
from tests.common import get_test_home_assistant, mock_service
|
from tests.common import get_test_home_assistant, mock_service
|
||||||
from tests.components.lock import common
|
from tests.components.lock import common
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
"""The tests for the Demo Media player platform."""
|
"""The tests for the Demo Media player platform."""
|
||||||
|
import asyncio
|
||||||
import unittest
|
import unittest
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
import asyncio
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.setup import setup_component, async_setup_component
|
|
||||||
import homeassistant.components.media_player as mp
|
import homeassistant.components.media_player as mp
|
||||||
from homeassistant.helpers.aiohttp_client import DATA_CLIENTSESSION
|
from homeassistant.helpers.aiohttp_client import DATA_CLIENTSESSION
|
||||||
|
from homeassistant.setup import async_setup_component, setup_component
|
||||||
|
|
||||||
from tests.common import get_test_home_assistant
|
from tests.common import get_test_home_assistant
|
||||||
from tests.components.media_player import common
|
from tests.components.media_player import common
|
||||||
|
@ -5,11 +5,11 @@ from unittest.mock import patch
|
|||||||
import pytest
|
import pytest
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
import homeassistant.components.notify as notify
|
|
||||||
from homeassistant.setup import setup_component
|
|
||||||
import homeassistant.components.demo.notify as demo
|
import homeassistant.components.demo.notify as demo
|
||||||
|
import homeassistant.components.notify as notify
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import callback
|
||||||
from homeassistant.helpers import discovery, script
|
from homeassistant.helpers import discovery, script
|
||||||
|
from homeassistant.setup import setup_component
|
||||||
|
|
||||||
from tests.common import assert_setup_component, get_test_home_assistant
|
from tests.common import assert_setup_component, get_test_home_assistant
|
||||||
from tests.components.notify import common
|
from tests.components.notify import common
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
# pylint: disable=protected-access
|
# pylint: disable=protected-access
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from homeassistant.setup import setup_component
|
|
||||||
import homeassistant.components.remote as remote
|
import homeassistant.components.remote as remote
|
||||||
from homeassistant.const import STATE_ON, STATE_OFF
|
from homeassistant.const import STATE_OFF, STATE_ON
|
||||||
|
from homeassistant.setup import setup_component
|
||||||
|
|
||||||
from tests.common import get_test_home_assistant
|
from tests.common import get_test_home_assistant
|
||||||
from tests.components.remote import common
|
from tests.components.remote import common
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
"""The tests for the demo stt component."""
|
"""The tests for the demo stt component."""
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from homeassistant.setup import async_setup_component
|
|
||||||
from homeassistant.components import stt
|
from homeassistant.components import stt
|
||||||
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
|
@ -2,6 +2,15 @@
|
|||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from homeassistant.components import vacuum
|
from homeassistant.components import vacuum
|
||||||
|
from homeassistant.components.demo.vacuum import (
|
||||||
|
DEMO_VACUUM_BASIC,
|
||||||
|
DEMO_VACUUM_COMPLETE,
|
||||||
|
DEMO_VACUUM_MINIMAL,
|
||||||
|
DEMO_VACUUM_MOST,
|
||||||
|
DEMO_VACUUM_NONE,
|
||||||
|
DEMO_VACUUM_STATE,
|
||||||
|
FAN_SPEEDS,
|
||||||
|
)
|
||||||
from homeassistant.components.vacuum import (
|
from homeassistant.components.vacuum import (
|
||||||
ATTR_BATTERY_LEVEL,
|
ATTR_BATTERY_LEVEL,
|
||||||
ATTR_COMMAND,
|
ATTR_COMMAND,
|
||||||
@ -13,21 +22,12 @@ from homeassistant.components.vacuum import (
|
|||||||
ENTITY_ID_ALL_VACUUMS,
|
ENTITY_ID_ALL_VACUUMS,
|
||||||
SERVICE_SEND_COMMAND,
|
SERVICE_SEND_COMMAND,
|
||||||
SERVICE_SET_FAN_SPEED,
|
SERVICE_SET_FAN_SPEED,
|
||||||
STATE_DOCKED,
|
|
||||||
STATE_CLEANING,
|
STATE_CLEANING,
|
||||||
STATE_PAUSED,
|
STATE_DOCKED,
|
||||||
STATE_IDLE,
|
STATE_IDLE,
|
||||||
|
STATE_PAUSED,
|
||||||
STATE_RETURNING,
|
STATE_RETURNING,
|
||||||
)
|
)
|
||||||
from homeassistant.components.demo.vacuum import (
|
|
||||||
DEMO_VACUUM_BASIC,
|
|
||||||
DEMO_VACUUM_COMPLETE,
|
|
||||||
DEMO_VACUUM_MINIMAL,
|
|
||||||
DEMO_VACUUM_MOST,
|
|
||||||
DEMO_VACUUM_NONE,
|
|
||||||
DEMO_VACUUM_STATE,
|
|
||||||
FAN_SPEEDS,
|
|
||||||
)
|
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
ATTR_ENTITY_ID,
|
ATTR_ENTITY_ID,
|
||||||
ATTR_SUPPORTED_FEATURES,
|
ATTR_SUPPORTED_FEATURES,
|
||||||
@ -40,7 +40,6 @@ from homeassistant.setup import setup_component
|
|||||||
from tests.common import get_test_home_assistant, mock_service
|
from tests.common import get_test_home_assistant, mock_service
|
||||||
from tests.components.vacuum import common
|
from tests.components.vacuum import common
|
||||||
|
|
||||||
|
|
||||||
ENTITY_VACUUM_BASIC = "{}.{}".format(DOMAIN, DEMO_VACUUM_BASIC).lower()
|
ENTITY_VACUUM_BASIC = "{}.{}".format(DOMAIN, DEMO_VACUUM_BASIC).lower()
|
||||||
ENTITY_VACUUM_COMPLETE = "{}.{}".format(DOMAIN, DEMO_VACUUM_COMPLETE).lower()
|
ENTITY_VACUUM_COMPLETE = "{}.{}".format(DOMAIN, DEMO_VACUUM_COMPLETE).lower()
|
||||||
ENTITY_VACUUM_MINIMAL = "{}.{}".format(DOMAIN, DEMO_VACUUM_MINIMAL).lower()
|
ENTITY_VACUUM_MINIMAL = "{}.{}".format(DOMAIN, DEMO_VACUUM_MINIMAL).lower()
|
||||||
|
@ -4,14 +4,13 @@ import unittest
|
|||||||
import pytest
|
import pytest
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.util.unit_system import IMPERIAL_SYSTEM
|
|
||||||
from homeassistant.setup import setup_component
|
|
||||||
from homeassistant.components import water_heater
|
from homeassistant.components import water_heater
|
||||||
|
from homeassistant.setup import setup_component
|
||||||
|
from homeassistant.util.unit_system import IMPERIAL_SYSTEM
|
||||||
|
|
||||||
from tests.common import get_test_home_assistant
|
from tests.common import get_test_home_assistant
|
||||||
from tests.components.water_heater import common
|
from tests.components.water_heater import common
|
||||||
|
|
||||||
|
|
||||||
ENTITY_WATER_HEATER = "water_heater.demo_water_heater"
|
ENTITY_WATER_HEATER = "water_heater.demo_water_heater"
|
||||||
ENTITY_WATER_HEATER_CELSIUS = "water_heater.demo_water_heater_celsius"
|
ENTITY_WATER_HEATER_CELSIUS = "water_heater.demo_water_heater_celsius"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user