Move quirks location

This commit is contained in:
epenet
2025-10-01 12:57:36 +00:00
parent 29282ed2ec
commit e201adf4e0
10 changed files with 19 additions and 7 deletions

View File

@@ -17,6 +17,7 @@ from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import ConfigEntryAuthFailed
from homeassistant.helpers import device_registry as dr
from homeassistant.helpers.dispatcher import dispatcher_send
from homeassistant.xternal_tuya_quirks import register_tuya_quirks
from .const import (
CONF_APP_TYPE,
@@ -31,7 +32,6 @@ from .const import (
TUYA_DISCOVERY_NEW,
TUYA_HA_SIGNAL_UPDATE_ENTITY,
)
from .quirks import register_tuya_quirks
# Suppress logs from the library, it logs unneeded on error
logging.getLogger("tuya_sharing").setLevel(logging.CRITICAL)

View File

@@ -18,12 +18,16 @@ from homeassistant.components.cover import (
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.xternal_tuya_quirks import (
TUYA_QUIRKS_REGISTRY,
TuyaCoverDefinition,
parse_enum,
)
from . import TuyaConfigEntry
from .const import TUYA_DISCOVERY_NEW, DeviceCategory, DPCode, DPType
from .entity import TuyaEntity
from .models import EnumTypeData, IntegerTypeData
from .quirks import TUYA_QUIRKS_REGISTRY, TuyaCoverDefinition, parse_enum
from .util import get_dpcode

View File

@@ -9,11 +9,15 @@ from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.xternal_tuya_quirks import (
TUYA_QUIRKS_REGISTRY,
TuyaSelectDefinition,
parse_enum,
)
from . import TuyaConfigEntry
from .const import TUYA_DISCOVERY_NEW, DeviceCategory, DPCode, DPType
from .entity import TuyaEntity
from .quirks import TUYA_QUIRKS_REGISTRY, TuyaSelectDefinition, parse_enum
# All descriptions can be found here. Mostly the Enum data types in the
# default instructions set of each category end up being a select.

View File

@@ -30,6 +30,11 @@ from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from homeassistant.helpers.typing import StateType
from homeassistant.xternal_tuya_quirks import (
TUYA_QUIRKS_REGISTRY,
TuyaSensorDefinition,
parse_enum,
)
from . import TuyaConfigEntry
from .const import (
@@ -44,7 +49,6 @@ from .const import (
)
from .entity import TuyaEntity
from .models import ComplexValue, ElectricityValue, EnumTypeData, IntegerTypeData
from .quirks import TUYA_QUIRKS_REGISTRY, TuyaSensorDefinition, parse_enum
from .util import get_dptype
_WIND_DIRECTIONS = {

View File

@@ -2,9 +2,9 @@
from __future__ import annotations
from .. import TUYA_QUIRKS_REGISTRY
from ..device_quirk import TuyaDeviceQuirk
from ..homeassistant import TuyaCoverDeviceClass, TuyaEntityCategory
from .. import TUYA_QUIRKS_REGISTRY # noqa: TID252
from ..device_quirk import TuyaDeviceQuirk # noqa: TID252
from ..homeassistant import TuyaCoverDeviceClass, TuyaEntityCategory # noqa: TID252
(
# This model has percent_state and percent_control but percent_state never