diff --git a/homeassistant/components/tuya/binary_sensor.py b/homeassistant/components/tuya/binary_sensor.py index 4759a24905a..a8c9157caa7 100644 --- a/homeassistant/components/tuya/binary_sensor.py +++ b/homeassistant/components/tuya/binary_sensor.py @@ -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", ), ), diff --git a/homeassistant/components/tuya/const.py b/homeassistant/components/tuya/const.py index eb56761d26a..08bdef474ef 100644 --- a/homeassistant/components/tuya/const.py +++ b/homeassistant/components/tuya/const.py @@ -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" diff --git a/homeassistant/components/tuya/number.py b/homeassistant/components/tuya/number.py index d989cad07bb..d2e381d9982 100644 --- a/homeassistant/components/tuya/number.py +++ b/homeassistant/components/tuya/number.py @@ -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 diff --git a/homeassistant/components/tuya/strings.json b/homeassistant/components/tuya/strings.json index 865fbaffbbe..0f005821cbb 100644 --- a/homeassistant/components/tuya/strings.json +++ b/homeassistant/components/tuya/strings.json @@ -146,6 +146,9 @@ "far_detection": { "name": "Far detection" }, + "target_dis_closest": { + "name": "Clostest target distance" + }, "water_level": { "name": "Water level" },