mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 01:08:12 +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": (
|
||||
TuyaBinarySensorEntityDescription(
|
||||
key=DPCode.PRESENCE_STATE,
|
||||
device_class=BinarySensorDeviceClass.MOTION,
|
||||
device_class=BinarySensorDeviceClass.OCCUPANCY,
|
||||
on_value="presence",
|
||||
),
|
||||
),
|
||||
|
@ -326,6 +326,7 @@ class DPCode(StrEnum):
|
||||
SWITCH_USB6 = "switch_usb6" # USB 6
|
||||
SWITCH_VERTICAL = "switch_vertical" # Vertical swing flap switch
|
||||
SWITCH_VOICE = "switch_voice" # Voice switch
|
||||
TARGET_DIS_CLOSEST = "target_dis_closest" # Closest target distance
|
||||
TEMP = "temp" # Temperature setting
|
||||
TEMP_BOILING_C = "temp_boiling_c"
|
||||
TEMP_BOILING_F = "temp_boiling_f"
|
||||
|
@ -87,13 +87,20 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = {
|
||||
NumberEntityDescription(
|
||||
key=DPCode.NEAR_DETECTION,
|
||||
translation_key="near_detection",
|
||||
device_class=NumberDeviceClass.DISTANCE,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.FAR_DETECTION,
|
||||
translation_key="far_detection",
|
||||
device_class=NumberDeviceClass.DISTANCE,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.TARGET_DIS_CLOSEST,
|
||||
translation_key="target_dis_closest",
|
||||
device_class=NumberDeviceClass.DISTANCE,
|
||||
),
|
||||
),
|
||||
# Coffee maker
|
||||
# https://developer.tuya.com/en/docs/iot/categorykfj?id=Kaiuz2p12pc7f
|
||||
|
@ -146,6 +146,9 @@
|
||||
"far_detection": {
|
||||
"name": "Far detection"
|
||||
},
|
||||
"target_dis_closest": {
|
||||
"name": "Clostest target distance"
|
||||
},
|
||||
"water_level": {
|
||||
"name": "Water level"
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user