Use StrEnum in Tuya constants (#63073)
parent
f724aea0bb
commit
540ccc37b5
|
@ -3,11 +3,11 @@ from __future__ import annotations
|
|||
|
||||
from collections.abc import Callable
|
||||
from dataclasses import dataclass, field
|
||||
from enum import Enum
|
||||
import logging
|
||||
|
||||
from tuya_iot import TuyaCloudOpenAPIEndpoint
|
||||
|
||||
from homeassistant.backports.enum import StrEnum
|
||||
from homeassistant.components.sensor import SensorDeviceClass
|
||||
from homeassistant.const import (
|
||||
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
|
||||
|
@ -98,7 +98,7 @@ PLATFORMS = [
|
|||
]
|
||||
|
||||
|
||||
class WorkMode(str, Enum):
|
||||
class WorkMode(StrEnum):
|
||||
"""Work modes."""
|
||||
|
||||
COLOUR = "colour"
|
||||
|
@ -107,8 +107,8 @@ class WorkMode(str, Enum):
|
|||
WHITE = "white"
|
||||
|
||||
|
||||
class DPCode(str, Enum):
|
||||
"""Device Property Codes used by Tuya.
|
||||
class DPCode(StrEnum):
|
||||
"""Data Point Codes used by Tuya.
|
||||
|
||||
https://developer.tuya.com/en/docs/iot/standarddescription?id=K9i5ql6waswzq
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue