mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Update Tuya integration with target distance (#126700)
Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
parent
e351f8ba07
commit
7e41b40441
@ -150,7 +150,7 @@ BINARY_SENSORS: dict[str, tuple[TuyaBinarySensorEntityDescription, ...]] = {
|
|||||||
"hps": (
|
"hps": (
|
||||||
TuyaBinarySensorEntityDescription(
|
TuyaBinarySensorEntityDescription(
|
||||||
key=DPCode.PRESENCE_STATE,
|
key=DPCode.PRESENCE_STATE,
|
||||||
device_class=BinarySensorDeviceClass.MOTION,
|
device_class=BinarySensorDeviceClass.OCCUPANCY,
|
||||||
on_value="presence",
|
on_value="presence",
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -326,6 +326,7 @@ class DPCode(StrEnum):
|
|||||||
SWITCH_USB6 = "switch_usb6" # USB 6
|
SWITCH_USB6 = "switch_usb6" # USB 6
|
||||||
SWITCH_VERTICAL = "switch_vertical" # Vertical swing flap switch
|
SWITCH_VERTICAL = "switch_vertical" # Vertical swing flap switch
|
||||||
SWITCH_VOICE = "switch_voice" # Voice switch
|
SWITCH_VOICE = "switch_voice" # Voice switch
|
||||||
|
TARGET_DIS_CLOSEST = "target_dis_closest" # Closest target distance
|
||||||
TEMP = "temp" # Temperature setting
|
TEMP = "temp" # Temperature setting
|
||||||
TEMP_BOILING_C = "temp_boiling_c"
|
TEMP_BOILING_C = "temp_boiling_c"
|
||||||
TEMP_BOILING_F = "temp_boiling_f"
|
TEMP_BOILING_F = "temp_boiling_f"
|
||||||
|
@ -87,13 +87,20 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = {
|
|||||||
NumberEntityDescription(
|
NumberEntityDescription(
|
||||||
key=DPCode.NEAR_DETECTION,
|
key=DPCode.NEAR_DETECTION,
|
||||||
translation_key="near_detection",
|
translation_key="near_detection",
|
||||||
|
device_class=NumberDeviceClass.DISTANCE,
|
||||||
entity_category=EntityCategory.CONFIG,
|
entity_category=EntityCategory.CONFIG,
|
||||||
),
|
),
|
||||||
NumberEntityDescription(
|
NumberEntityDescription(
|
||||||
key=DPCode.FAR_DETECTION,
|
key=DPCode.FAR_DETECTION,
|
||||||
translation_key="far_detection",
|
translation_key="far_detection",
|
||||||
|
device_class=NumberDeviceClass.DISTANCE,
|
||||||
entity_category=EntityCategory.CONFIG,
|
entity_category=EntityCategory.CONFIG,
|
||||||
),
|
),
|
||||||
|
NumberEntityDescription(
|
||||||
|
key=DPCode.TARGET_DIS_CLOSEST,
|
||||||
|
translation_key="target_dis_closest",
|
||||||
|
device_class=NumberDeviceClass.DISTANCE,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
# Coffee maker
|
# Coffee maker
|
||||||
# https://developer.tuya.com/en/docs/iot/categorykfj?id=Kaiuz2p12pc7f
|
# https://developer.tuya.com/en/docs/iot/categorykfj?id=Kaiuz2p12pc7f
|
||||||
|
@ -146,6 +146,9 @@
|
|||||||
"far_detection": {
|
"far_detection": {
|
||||||
"name": "Far detection"
|
"name": "Far detection"
|
||||||
},
|
},
|
||||||
|
"target_dis_closest": {
|
||||||
|
"name": "Clostest target distance"
|
||||||
|
},
|
||||||
"water_level": {
|
"water_level": {
|
||||||
"name": "Water level"
|
"name": "Water level"
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user