mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Fix Tuya unsupported cameras (#136960)
This commit is contained in:
parent
a03c588002
commit
d4c5479e50
@ -20,6 +20,9 @@ CAMERAS: tuple[str, ...] = (
|
|||||||
# Smart Camera (including doorbells)
|
# Smart Camera (including doorbells)
|
||||||
# https://developer.tuya.com/en/docs/iot/categorysgbj?id=Kaiuz37tlpbnu
|
# https://developer.tuya.com/en/docs/iot/categorysgbj?id=Kaiuz37tlpbnu
|
||||||
"sp",
|
"sp",
|
||||||
|
# Smart Camera - Low power consumption camera
|
||||||
|
# Undocumented, see https://github.com/home-assistant/core/issues/132844
|
||||||
|
"dghsxj",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -261,6 +261,20 @@ LIGHTS: dict[str, tuple[TuyaLightEntityDescription, ...]] = {
|
|||||||
entity_category=EntityCategory.CONFIG,
|
entity_category=EntityCategory.CONFIG,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
# Smart Camera - Low power consumption camera
|
||||||
|
# Undocumented, see https://github.com/home-assistant/core/issues/132844
|
||||||
|
"dghsxj": (
|
||||||
|
TuyaLightEntityDescription(
|
||||||
|
key=DPCode.FLOODLIGHT_SWITCH,
|
||||||
|
brightness=DPCode.FLOODLIGHT_LIGHTNESS,
|
||||||
|
name="Floodlight",
|
||||||
|
),
|
||||||
|
TuyaLightEntityDescription(
|
||||||
|
key=DPCode.BASIC_INDICATOR,
|
||||||
|
name="Indicator light",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
),
|
||||||
|
),
|
||||||
# Smart Gardening system
|
# Smart Gardening system
|
||||||
# https://developer.tuya.com/en/docs/iot/categorysz?id=Kaiuz4e6h7up0
|
# https://developer.tuya.com/en/docs/iot/categorysz?id=Kaiuz4e6h7up0
|
||||||
"sz": (
|
"sz": (
|
||||||
|
@ -174,6 +174,15 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = {
|
|||||||
entity_category=EntityCategory.CONFIG,
|
entity_category=EntityCategory.CONFIG,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
# Smart Camera - Low power consumption camera
|
||||||
|
# Undocumented, see https://github.com/home-assistant/core/issues/132844
|
||||||
|
"dghsxj": (
|
||||||
|
NumberEntityDescription(
|
||||||
|
key=DPCode.BASIC_DEVICE_VOLUME,
|
||||||
|
translation_key="volume",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
),
|
||||||
|
),
|
||||||
# Dimmer Switch
|
# Dimmer Switch
|
||||||
# https://developer.tuya.com/en/docs/iot/categorytgkg?id=Kaiuz0ktx7m0o
|
# https://developer.tuya.com/en/docs/iot/categorytgkg?id=Kaiuz0ktx7m0o
|
||||||
"tgkg": (
|
"tgkg": (
|
||||||
|
@ -128,6 +128,40 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = {
|
|||||||
translation_key="motion_sensitivity",
|
translation_key="motion_sensitivity",
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
# Smart Camera - Low power consumption camera
|
||||||
|
# Undocumented, see https://github.com/home-assistant/core/issues/132844
|
||||||
|
"dghsxj": (
|
||||||
|
SelectEntityDescription(
|
||||||
|
key=DPCode.IPC_WORK_MODE,
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
translation_key="ipc_work_mode",
|
||||||
|
),
|
||||||
|
SelectEntityDescription(
|
||||||
|
key=DPCode.DECIBEL_SENSITIVITY,
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
translation_key="decibel_sensitivity",
|
||||||
|
),
|
||||||
|
SelectEntityDescription(
|
||||||
|
key=DPCode.RECORD_MODE,
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
translation_key="record_mode",
|
||||||
|
),
|
||||||
|
SelectEntityDescription(
|
||||||
|
key=DPCode.BASIC_NIGHTVISION,
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
translation_key="basic_nightvision",
|
||||||
|
),
|
||||||
|
SelectEntityDescription(
|
||||||
|
key=DPCode.BASIC_ANTI_FLICKER,
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
translation_key="basic_anti_flicker",
|
||||||
|
),
|
||||||
|
SelectEntityDescription(
|
||||||
|
key=DPCode.MOTION_SENSITIVITY,
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
translation_key="motion_sensitivity",
|
||||||
|
),
|
||||||
|
),
|
||||||
# IoT Switch?
|
# IoT Switch?
|
||||||
# Note: Undocumented
|
# Note: Undocumented
|
||||||
"tdq": (
|
"tdq": (
|
||||||
|
@ -632,6 +632,29 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = {
|
|||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
# Smart Camera - Low power consumption camera
|
||||||
|
# Undocumented, see https://github.com/home-assistant/core/issues/132844
|
||||||
|
"dghsxj": (
|
||||||
|
TuyaSensorEntityDescription(
|
||||||
|
key=DPCode.SENSOR_TEMPERATURE,
|
||||||
|
translation_key="temperature",
|
||||||
|
device_class=SensorDeviceClass.TEMPERATURE,
|
||||||
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
),
|
||||||
|
TuyaSensorEntityDescription(
|
||||||
|
key=DPCode.SENSOR_HUMIDITY,
|
||||||
|
translation_key="humidity",
|
||||||
|
device_class=SensorDeviceClass.HUMIDITY,
|
||||||
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
),
|
||||||
|
TuyaSensorEntityDescription(
|
||||||
|
key=DPCode.WIRELESS_ELECTRICITY,
|
||||||
|
translation_key="battery",
|
||||||
|
device_class=SensorDeviceClass.BATTERY,
|
||||||
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
),
|
||||||
|
),
|
||||||
# Fingerbot
|
# Fingerbot
|
||||||
"szjqr": BATTERY_SENSORS,
|
"szjqr": BATTERY_SENSORS,
|
||||||
# Solar Light
|
# Solar Light
|
||||||
|
@ -44,6 +44,13 @@ SIRENS: dict[str, tuple[SirenEntityDescription, ...]] = {
|
|||||||
key=DPCode.SIREN_SWITCH,
|
key=DPCode.SIREN_SWITCH,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
# Smart Camera - Low power consumption camera
|
||||||
|
# Undocumented, see https://github.com/home-assistant/core/issues/132844
|
||||||
|
"dghsxj": (
|
||||||
|
SirenEntityDescription(
|
||||||
|
key=DPCode.SIREN_SWITCH,
|
||||||
|
),
|
||||||
|
),
|
||||||
# CO2 Detector
|
# CO2 Detector
|
||||||
# https://developer.tuya.com/en/docs/iot/categoryco2bj?id=Kaiuz3wes7yuy
|
# https://developer.tuya.com/en/docs/iot/categoryco2bj?id=Kaiuz3wes7yuy
|
||||||
"co2bj": (
|
"co2bj": (
|
||||||
|
@ -509,6 +509,65 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
|||||||
entity_category=EntityCategory.CONFIG,
|
entity_category=EntityCategory.CONFIG,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
# Smart Camera - Low power consumption camera
|
||||||
|
# Undocumented, see https://github.com/home-assistant/core/issues/132844
|
||||||
|
"dghsxj": (
|
||||||
|
SwitchEntityDescription(
|
||||||
|
key=DPCode.WIRELESS_BATTERYLOCK,
|
||||||
|
translation_key="battery_lock",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
),
|
||||||
|
SwitchEntityDescription(
|
||||||
|
key=DPCode.CRY_DETECTION_SWITCH,
|
||||||
|
translation_key="cry_detection",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
),
|
||||||
|
SwitchEntityDescription(
|
||||||
|
key=DPCode.DECIBEL_SWITCH,
|
||||||
|
translation_key="sound_detection",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
),
|
||||||
|
SwitchEntityDescription(
|
||||||
|
key=DPCode.RECORD_SWITCH,
|
||||||
|
translation_key="video_recording",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
),
|
||||||
|
SwitchEntityDescription(
|
||||||
|
key=DPCode.MOTION_RECORD,
|
||||||
|
translation_key="motion_recording",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
),
|
||||||
|
SwitchEntityDescription(
|
||||||
|
key=DPCode.BASIC_PRIVATE,
|
||||||
|
translation_key="privacy_mode",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
),
|
||||||
|
SwitchEntityDescription(
|
||||||
|
key=DPCode.BASIC_FLIP,
|
||||||
|
translation_key="flip",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
),
|
||||||
|
SwitchEntityDescription(
|
||||||
|
key=DPCode.BASIC_OSD,
|
||||||
|
translation_key="time_watermark",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
),
|
||||||
|
SwitchEntityDescription(
|
||||||
|
key=DPCode.BASIC_WDR,
|
||||||
|
translation_key="wide_dynamic_range",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
),
|
||||||
|
SwitchEntityDescription(
|
||||||
|
key=DPCode.MOTION_TRACKING,
|
||||||
|
translation_key="motion_tracking",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
),
|
||||||
|
SwitchEntityDescription(
|
||||||
|
key=DPCode.MOTION_SWITCH,
|
||||||
|
translation_key="motion_alarm",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
),
|
||||||
|
),
|
||||||
# Smart Gardening system
|
# Smart Gardening system
|
||||||
# https://developer.tuya.com/en/docs/iot/categorysz?id=Kaiuz4e6h7up0
|
# https://developer.tuya.com/en/docs/iot/categorysz?id=Kaiuz4e6h7up0
|
||||||
"sz": (
|
"sz": (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user