Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions homeassistant/components/tuya/alarm_control_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ class TuyaAlarmEntity(TuyaEntity, AlarmControlPanelEntity):
"""Tuya Alarm Entity."""

_attr_icon = "mdi:security"
_attr_name = None

def __init__(
self,
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/tuya/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class TuyaCameraEntity(TuyaEntity, CameraEntity):

_attr_supported_features = CameraEntityFeature.STREAM
_attr_brand = "Tuya"
_attr_name = None

def __init__(
self,
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/tuya/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ class TuyaClimateEntity(TuyaEntity, ClimateEntity):
_set_humidity: IntegerTypeData | None = None
_set_temperature: IntegerTypeData | None = None
entity_description: TuyaClimateEntityDescription
_attr_name = None

def __init__(
self,
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/tuya/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class TuyaFanEntity(TuyaEntity, FanEntity):
_speed: IntegerTypeData | None = None
_speeds: EnumTypeData | None = None
_switch: DPCode | None = None
_attr_name = None

def __init__(
self,
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/tuya/humidifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ class TuyaHumidifierEntity(TuyaEntity, HumidifierEntity):
_set_humidity: IntegerTypeData | None = None
_switch_dpcode: DPCode | None = None
entity_description: TuyaHumidifierEntityDescription
_attr_name = None

def __init__(
self,
Expand Down
14 changes: 14 additions & 0 deletions homeassistant/components/tuya/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class TuyaLightEntityDescription(LightEntityDescription):
"dc": (
TuyaLightEntityDescription(
key=DPCode.SWITCH_LED,
name=None,
color_mode=DPCode.WORK_MODE,
brightness=DPCode.BRIGHT_VALUE,
color_temp=DPCode.TEMP_VALUE,
Expand All @@ -90,6 +91,7 @@ class TuyaLightEntityDescription(LightEntityDescription):
"dd": (
TuyaLightEntityDescription(
key=DPCode.SWITCH_LED,
name=None,
color_mode=DPCode.WORK_MODE,
brightness=DPCode.BRIGHT_VALUE,
color_temp=DPCode.TEMP_VALUE,
Expand All @@ -102,6 +104,7 @@ class TuyaLightEntityDescription(LightEntityDescription):
"dj": (
TuyaLightEntityDescription(
key=DPCode.SWITCH_LED,
name=None,
color_mode=DPCode.WORK_MODE,
brightness=(DPCode.BRIGHT_VALUE_V2, DPCode.BRIGHT_VALUE),
color_temp=(DPCode.TEMP_VALUE_V2, DPCode.TEMP_VALUE),
Expand All @@ -120,6 +123,7 @@ class TuyaLightEntityDescription(LightEntityDescription):
"fsd": (
TuyaLightEntityDescription(
key=DPCode.SWITCH_LED,
name=None,
color_mode=DPCode.WORK_MODE,
brightness=DPCode.BRIGHT_VALUE,
color_temp=DPCode.TEMP_VALUE,
Expand All @@ -128,13 +132,15 @@ class TuyaLightEntityDescription(LightEntityDescription):
# Some ceiling fan lights use LIGHT for DPCode instead of SWITCH_LED
TuyaLightEntityDescription(
key=DPCode.LIGHT,
name=None,
),
),
# Ambient Light
# https://developer.tuya.com/en/docs/iot/ambient-light?id=Kaiuz06amhe6g
"fwd": (
TuyaLightEntityDescription(
key=DPCode.SWITCH_LED,
name=None,
color_mode=DPCode.WORK_MODE,
brightness=DPCode.BRIGHT_VALUE,
color_temp=DPCode.TEMP_VALUE,
Expand All @@ -146,6 +152,7 @@ class TuyaLightEntityDescription(LightEntityDescription):
"gyd": (
TuyaLightEntityDescription(
key=DPCode.SWITCH_LED,
name=None,
color_mode=DPCode.WORK_MODE,
brightness=DPCode.BRIGHT_VALUE,
color_temp=DPCode.TEMP_VALUE,
Expand All @@ -157,6 +164,7 @@ class TuyaLightEntityDescription(LightEntityDescription):
"jsq": (
TuyaLightEntityDescription(
key=DPCode.SWITCH_LED,
name=None,
color_mode=DPCode.WORK_MODE,
brightness=DPCode.BRIGHT_VALUE,
color_data=DPCode.COLOUR_DATA_HSV,
Expand Down Expand Up @@ -195,6 +203,7 @@ class TuyaLightEntityDescription(LightEntityDescription):
"mbd": (
TuyaLightEntityDescription(
key=DPCode.SWITCH_LED,
name=None,
color_mode=DPCode.WORK_MODE,
brightness=DPCode.BRIGHT_VALUE,
color_data=DPCode.COLOUR_DATA,
Expand All @@ -206,6 +215,7 @@ class TuyaLightEntityDescription(LightEntityDescription):
"qjdcz": (
TuyaLightEntityDescription(
key=DPCode.SWITCH_LED,
name=None,
color_mode=DPCode.WORK_MODE,
brightness=DPCode.BRIGHT_VALUE,
color_data=DPCode.COLOUR_DATA,
Expand Down Expand Up @@ -296,6 +306,7 @@ class TuyaLightEntityDescription(LightEntityDescription):
"tyndj": (
TuyaLightEntityDescription(
key=DPCode.SWITCH_LED,
name=None,
color_mode=DPCode.WORK_MODE,
brightness=DPCode.BRIGHT_VALUE,
color_temp=DPCode.TEMP_VALUE,
Expand All @@ -307,6 +318,7 @@ class TuyaLightEntityDescription(LightEntityDescription):
"xdd": (
TuyaLightEntityDescription(
key=DPCode.SWITCH_LED,
name=None,
color_mode=DPCode.WORK_MODE,
brightness=DPCode.BRIGHT_VALUE,
color_temp=DPCode.TEMP_VALUE,
Expand All @@ -322,6 +334,7 @@ class TuyaLightEntityDescription(LightEntityDescription):
"ykq": (
TuyaLightEntityDescription(
key=DPCode.SWITCH_CONTROLLER,
name=None,
color_mode=DPCode.WORK_MODE,
brightness=DPCode.BRIGHT_CONTROLLER,
color_temp=DPCode.TEMP_CONTROLLER,
Expand All @@ -332,6 +345,7 @@ class TuyaLightEntityDescription(LightEntityDescription):
"fs": (
TuyaLightEntityDescription(
key=DPCode.LIGHT,
name=None,
color_mode=DPCode.WORK_MODE,
brightness=DPCode.BRIGHT_VALUE,
color_temp=DPCode.TEMP_VALUE,
Expand Down
4 changes: 1 addition & 3 deletions homeassistant/components/tuya/siren.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,20 @@
"dgnbj": (
SirenEntityDescription(
key=DPCode.ALARM_SWITCH,
name="Siren",
),
),
# Siren Alarm
# https://developer.tuya.com/en/docs/iot/categorysgbj?id=Kaiuz37tlpbnu
"sgbj": (
SirenEntityDescription(
key=DPCode.ALARM_SWITCH,
name="Siren",
),
),
# Smart Camera
# https://developer.tuya.com/en/docs/iot/categorysp?id=Kaiuz35leyo12
"sp": (
SirenEntityDescription(
key=DPCode.SIREN_SWITCH,
name="Siren",
),
),
}
Expand Down Expand Up @@ -83,6 +80,7 @@ class TuyaSirenEntity(TuyaEntity, SirenEntity):
"""Tuya Siren Entity."""

_attr_supported_features = SirenEntityFeature.TURN_ON | SirenEntityFeature.TURN_OFF
_attr_name = None
Comment thread
frenck marked this conversation as resolved.

def __init__(
self,
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/tuya/vacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class TuyaVacuumEntity(TuyaEntity, StateVacuumEntity):

_fan_speed: EnumTypeData | None = None
_battery_level: IntegerTypeData | None = None
_attr_name = None

def __init__(self, device: TuyaDevice, device_manager: TuyaDeviceManager) -> None:
"""Init Tuya vacuum."""
Expand Down