From 540ccc37b5208fd5fbcd5fd5d2554cad51f46fe5 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 30 Dec 2021 19:23:27 +0100 Subject: [PATCH] Use StrEnum in Tuya constants (#63073) --- homeassistant/components/tuya/const.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/tuya/const.py b/homeassistant/components/tuya/const.py index 4911f5e83a1..d1875f14811 100644 --- a/homeassistant/components/tuya/const.py +++ b/homeassistant/components/tuya/const.py @@ -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 """