Move EntityCategory to homeassistant.const (#87792)

* Move EntityCategory to homeassistant.const

* Fix more imports
This commit is contained in:
Erik Montnemery 2023-02-09 20:15:37 +01:00 committed by GitHub
parent abf0c87e40
commit cc564026fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
456 changed files with 644 additions and 632 deletions

View file

@ -28,9 +28,9 @@ from homeassistant.components.homekit_controller.const import (
)
from homeassistant.components.homekit_controller.utils import async_get_controller
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant, State, callback
from homeassistant.helpers import device_registry as dr, entity_registry as er
from homeassistant.helpers.entity import EntityCategory
from homeassistant.helpers.service_info.bluetooth import BluetoothServiceInfo
from homeassistant.setup import async_setup_component
import homeassistant.util.dt as dt_util

View file

@ -4,7 +4,7 @@ https://github.com/home-assistant/core/issues/20957
"""
from homeassistant.components.alarm_control_panel import AlarmControlPanelEntityFeature
from homeassistant.components.number import NumberMode
from homeassistant.helpers.entity import EntityCategory
from homeassistant.const import EntityCategory
from ..common import (
HUB_TEST_ACCESSORY_ID,

View file

@ -7,8 +7,7 @@ https://github.com/home-assistant/core/pull/39090
"""
from homeassistant.components.sensor import SensorStateClass
from homeassistant.const import PERCENTAGE
from homeassistant.helpers.entity import EntityCategory
from homeassistant.const import PERCENTAGE, EntityCategory
from ..common import (
HUB_TEST_ACCESSORY_ID,

View file

@ -1,8 +1,7 @@
"""Make sure that an Arlo Baby can be setup."""
from homeassistant.components.sensor import SensorStateClass
from homeassistant.const import PERCENTAGE, TEMP_CELSIUS
from homeassistant.helpers.entity import EntityCategory
from homeassistant.const import PERCENTAGE, TEMP_CELSIUS, EntityCategory
from ..common import (
HUB_TEST_ACCESSORY_ID,

View file

@ -2,8 +2,7 @@
from homeassistant.components.number import NumberMode
from homeassistant.components.sensor import SensorStateClass
from homeassistant.const import PERCENTAGE, TEMP_CELSIUS, UnitOfPressure
from homeassistant.helpers.entity import EntityCategory
from homeassistant.const import PERCENTAGE, TEMP_CELSIUS, EntityCategory, UnitOfPressure
from ..common import (
HUB_TEST_ACCESSORY_ID,

View file

@ -6,8 +6,8 @@ from homeassistant.const import (
ELECTRIC_POTENTIAL_VOLT,
ENERGY_KILO_WATT_HOUR,
POWER_WATT,
EntityCategory,
)
from homeassistant.helpers.entity import EntityCategory
from ..common import (
HUB_TEST_ACCESSORY_ID,

View file

@ -1,7 +1,7 @@
"""Make sure that a H.A.A. fan can be setup."""
from homeassistant.components.fan import ATTR_PERCENTAGE, FanEntityFeature
from homeassistant.helpers.entity import EntityCategory
from homeassistant.const import EntityCategory
from ..common import (
HUB_TEST_ACCESSORY_ID,

View file

@ -1,8 +1,7 @@
"""Tests for handling accessories on a Hue bridge via HomeKit."""
from homeassistant.components.sensor import SensorStateClass
from homeassistant.const import PERCENTAGE
from homeassistant.helpers.entity import EntityCategory
from homeassistant.const import PERCENTAGE, EntityCategory
from ..common import (
HUB_TEST_ACCESSORY_ID,

View file

@ -8,7 +8,7 @@ from aiohomekit.model import CharacteristicsTypes, ServicesTypes
from aiohomekit.testing import FakePairing
import pytest
from homeassistant.helpers.entity import EntityCategory
from homeassistant.const import EntityCategory
import homeassistant.util.dt as dt_util
from ..common import (

View file

@ -1,8 +1,7 @@
"""Tests for the Meross MSS425f power strip."""
from homeassistant.const import STATE_ON, STATE_UNKNOWN
from homeassistant.helpers.entity import EntityCategory
from homeassistant.const import STATE_ON, STATE_UNKNOWN, EntityCategory
from ..common import (
HUB_TEST_ACCESSORY_ID,

View file

@ -1,6 +1,6 @@
"""Make sure that Nanoleaf NL55 works with BLE."""
from homeassistant.helpers.entity import EntityCategory
from homeassistant.const import EntityCategory
from ..common import (
HUB_TEST_ACCESSORY_ID,

View file

@ -2,7 +2,7 @@
https://github.com/home-assistant/core/issues/78903
"""
from homeassistant.helpers.entity import EntityCategory
from homeassistant.const import EntityCategory
from ..common import (
HUB_TEST_ACCESSORY_ID,

View file

@ -2,8 +2,7 @@
from homeassistant.components.cover import CoverEntityFeature
from homeassistant.components.sensor import SensorStateClass
from homeassistant.const import PERCENTAGE
from homeassistant.helpers.entity import EntityCategory
from homeassistant.const import PERCENTAGE, EntityCategory
from ..common import (
HUB_TEST_ACCESSORY_ID,

View file

@ -3,8 +3,7 @@
from homeassistant.components.humidifier import HumidifierEntityFeature
from homeassistant.components.number import NumberMode
from homeassistant.components.sensor import SensorStateClass
from homeassistant.const import PERCENTAGE
from homeassistant.helpers.entity import EntityCategory
from homeassistant.const import PERCENTAGE, EntityCategory
from ..common import (
HUB_TEST_ACCESSORY_ID,