mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Fix Tuya Python 3.11 compatibility issue (#89189)
This commit is contained in:
parent
37ec442ffb
commit
d9fc932253
@ -1,7 +1,7 @@
|
|||||||
"""Support for the Tuya lights."""
|
"""Support for the Tuya lights."""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass, field
|
||||||
import json
|
import json
|
||||||
from typing import Any, cast
|
from typing import Any, cast
|
||||||
|
|
||||||
@ -59,7 +59,9 @@ class TuyaLightEntityDescription(LightEntityDescription):
|
|||||||
color_data: DPCode | tuple[DPCode, ...] | None = None
|
color_data: DPCode | tuple[DPCode, ...] | None = None
|
||||||
color_mode: DPCode | None = None
|
color_mode: DPCode | None = None
|
||||||
color_temp: DPCode | tuple[DPCode, ...] | None = None
|
color_temp: DPCode | tuple[DPCode, ...] | None = None
|
||||||
default_color_type: ColorTypeData = DEFAULT_COLOR_TYPE_DATA
|
default_color_type: ColorTypeData = field(
|
||||||
|
default_factory=lambda: DEFAULT_COLOR_TYPE_DATA
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
LIGHTS: dict[str, tuple[TuyaLightEntityDescription, ...]] = {
|
LIGHTS: dict[str, tuple[TuyaLightEntityDescription, ...]] = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user