Replace custom Tuya device classes with StrEnum (#63681)

This commit is contained in:
Franck Nijhof 2022-01-08 23:44:27 +01:00 committed by GitHub
parent e6419fd505
commit 71208b2ebb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 43 additions and 56 deletions

View file

@ -29,11 +29,11 @@ from homeassistant.helpers.typing import StateType
from . import HomeAssistantTuyaData
from .base import ElectricityTypeData, EnumTypeData, IntegerTypeData, TuyaEntity
from .const import (
DEVICE_CLASS_TUYA_STATUS,
DEVICE_CLASS_UNITS,
DOMAIN,
TUYA_DISCOVERY_NEW,
DPCode,
TuyaDeviceClass,
UnitOfMeasurement,
)
@ -100,7 +100,7 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = {
TuyaSensorEntityDescription(
key=DPCode.STATUS,
name="Status",
device_class=DEVICE_CLASS_TUYA_STATUS,
device_class=TuyaDeviceClass.STATUS,
),
),
# CO2 Detector