Rename tuya base entity module (#126180)

This commit is contained in:
epenet 2024-09-18 11:04:01 +02:00 committed by GitHub
parent 16ac303994
commit 8785a9869e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
16 changed files with 15 additions and 15 deletions

View File

@ -22,8 +22,8 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import TuyaConfigEntry from . import TuyaConfigEntry
from .base import TuyaEntity
from .const import TUYA_DISCOVERY_NEW, DPCode, DPType from .const import TUYA_DISCOVERY_NEW, DPCode, DPType
from .entity import TuyaEntity
class Mode(StrEnum): class Mode(StrEnum):

View File

@ -17,8 +17,8 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import TuyaConfigEntry from . import TuyaConfigEntry
from .base import TuyaEntity
from .const import TUYA_DISCOVERY_NEW, DPCode from .const import TUYA_DISCOVERY_NEW, DPCode
from .entity import TuyaEntity
@dataclass(frozen=True) @dataclass(frozen=True)

View File

@ -11,8 +11,8 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import TuyaConfigEntry from . import TuyaConfigEntry
from .base import TuyaEntity
from .const import TUYA_DISCOVERY_NEW, DPCode from .const import TUYA_DISCOVERY_NEW, DPCode
from .entity import TuyaEntity
# All descriptions can be found here. # All descriptions can be found here.
# https://developer.tuya.com/en/docs/iot/standarddescription?id=K9i5ql6waswzq # https://developer.tuya.com/en/docs/iot/standarddescription?id=K9i5ql6waswzq

View File

@ -11,8 +11,8 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import TuyaConfigEntry from . import TuyaConfigEntry
from .base import TuyaEntity
from .const import TUYA_DISCOVERY_NEW, DPCode from .const import TUYA_DISCOVERY_NEW, DPCode
from .entity import TuyaEntity
# All descriptions can be found here: # All descriptions can be found here:
# https://developer.tuya.com/en/docs/iot/standarddescription?id=K9i5ql6waswzq # https://developer.tuya.com/en/docs/iot/standarddescription?id=K9i5ql6waswzq

View File

@ -24,8 +24,8 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import TuyaConfigEntry from . import TuyaConfigEntry
from .base import IntegerTypeData, TuyaEntity
from .const import TUYA_DISCOVERY_NEW, DPCode, DPType from .const import TUYA_DISCOVERY_NEW, DPCode, DPType
from .entity import IntegerTypeData, TuyaEntity
TUYA_HVAC_TO_HA = { TUYA_HVAC_TO_HA = {
"auto": HVACMode.HEAT_COOL, "auto": HVACMode.HEAT_COOL,

View File

@ -20,8 +20,8 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import TuyaConfigEntry from . import TuyaConfigEntry
from .base import IntegerTypeData, TuyaEntity
from .const import TUYA_DISCOVERY_NEW, DPCode, DPType from .const import TUYA_DISCOVERY_NEW, DPCode, DPType
from .entity import IntegerTypeData, TuyaEntity
@dataclass(frozen=True) @dataclass(frozen=True)

View File

@ -21,8 +21,8 @@ from homeassistant.util.percentage import (
) )
from . import TuyaConfigEntry from . import TuyaConfigEntry
from .base import EnumTypeData, IntegerTypeData, TuyaEntity
from .const import TUYA_DISCOVERY_NEW, DPCode, DPType from .const import TUYA_DISCOVERY_NEW, DPCode, DPType
from .entity import EnumTypeData, IntegerTypeData, TuyaEntity
TUYA_SUPPORT_TYPE = { TUYA_SUPPORT_TYPE = {
"fs", # Fan "fs", # Fan

View File

@ -17,8 +17,8 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import TuyaConfigEntry from . import TuyaConfigEntry
from .base import IntegerTypeData, TuyaEntity
from .const import TUYA_DISCOVERY_NEW, DPCode, DPType from .const import TUYA_DISCOVERY_NEW, DPCode, DPType
from .entity import IntegerTypeData, TuyaEntity
@dataclass(frozen=True) @dataclass(frozen=True)

View File

@ -23,8 +23,8 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import TuyaConfigEntry from . import TuyaConfigEntry
from .base import IntegerTypeData, TuyaEntity
from .const import TUYA_DISCOVERY_NEW, DPCode, DPType, WorkMode from .const import TUYA_DISCOVERY_NEW, DPCode, DPType, WorkMode
from .entity import IntegerTypeData, TuyaEntity
from .util import remap_value from .util import remap_value

View File

@ -15,8 +15,8 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import TuyaConfigEntry from . import TuyaConfigEntry
from .base import IntegerTypeData, TuyaEntity
from .const import DEVICE_CLASS_UNITS, DOMAIN, TUYA_DISCOVERY_NEW, DPCode, DPType from .const import DEVICE_CLASS_UNITS, DOMAIN, TUYA_DISCOVERY_NEW, DPCode, DPType
from .entity import IntegerTypeData, TuyaEntity
# All descriptions can be found here. Mostly the Integer data types in the # All descriptions can be found here. Mostly the Integer data types in the
# default instructions set of each category end up being a number. # default instructions set of each category end up being a number.

View File

@ -11,8 +11,8 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import TuyaConfigEntry from . import TuyaConfigEntry
from .base import TuyaEntity
from .const import TUYA_DISCOVERY_NEW, DPCode, DPType from .const import TUYA_DISCOVERY_NEW, DPCode, DPType
from .entity import TuyaEntity
# All descriptions can be found here. Mostly the Enum data types in the # All descriptions can be found here. Mostly the Enum data types in the
# default instructions set of each category end up being a select. # default instructions set of each category end up being a select.

View File

@ -27,7 +27,6 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.typing import StateType from homeassistant.helpers.typing import StateType
from . import TuyaConfigEntry from . import TuyaConfigEntry
from .base import ElectricityTypeData, EnumTypeData, IntegerTypeData, TuyaEntity
from .const import ( from .const import (
DEVICE_CLASS_UNITS, DEVICE_CLASS_UNITS,
DOMAIN, DOMAIN,
@ -36,6 +35,7 @@ from .const import (
DPType, DPType,
UnitOfMeasurement, UnitOfMeasurement,
) )
from .entity import ElectricityTypeData, EnumTypeData, IntegerTypeData, TuyaEntity
@dataclass(frozen=True) @dataclass(frozen=True)

View File

@ -16,8 +16,8 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import TuyaConfigEntry from . import TuyaConfigEntry
from .base import TuyaEntity
from .const import TUYA_DISCOVERY_NEW, DPCode from .const import TUYA_DISCOVERY_NEW, DPCode
from .entity import TuyaEntity
# All descriptions can be found here: # All descriptions can be found here:
# https://developer.tuya.com/en/docs/iot/standarddescription?id=K9i5ql6waswzq # https://developer.tuya.com/en/docs/iot/standarddescription?id=K9i5ql6waswzq

View File

@ -17,8 +17,8 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import TuyaConfigEntry from . import TuyaConfigEntry
from .base import TuyaEntity
from .const import TUYA_DISCOVERY_NEW, DPCode from .const import TUYA_DISCOVERY_NEW, DPCode
from .entity import TuyaEntity
# All descriptions can be found here. Mostly the Boolean data types in the # All descriptions can be found here. Mostly the Boolean data types in the
# default instruction set of each category end up being a Switch. # default instruction set of each category end up being a Switch.

View File

@ -19,8 +19,8 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import TuyaConfigEntry from . import TuyaConfigEntry
from .base import EnumTypeData, IntegerTypeData, TuyaEntity
from .const import TUYA_DISCOVERY_NEW, DPCode, DPType from .const import TUYA_DISCOVERY_NEW, DPCode, DPType
from .entity import EnumTypeData, IntegerTypeData, TuyaEntity
TUYA_MODE_RETURN_HOME = "chargego" TUYA_MODE_RETURN_HOME = "chargego"
TUYA_STATUS_TO_HA = { TUYA_STATUS_TO_HA = {