diff --git a/homeassistant/components/tuya/const.py b/homeassistant/components/tuya/const.py index 5486e94786d..8a3e59b1ac9 100644 --- a/homeassistant/components/tuya/const.py +++ b/homeassistant/components/tuya/const.py @@ -181,6 +181,7 @@ class DPCode(StrEnum): CLEAN_AREA = "clean_area" CLEAN_TIME = "clean_time" CLICK_SUSTAIN_TIME = "click_sustain_time" + CLOUD_RECIPE_NUMBER = "cloud_recipe_number" CO_STATE = "co_state" CO_STATUS = "co_status" CO_VALUE = "co_value" @@ -191,6 +192,8 @@ class DPCode(StrEnum): COLOUR_DATA = "colour_data" # Colored light mode COLOUR_DATA_HSV = "colour_data_hsv" # Colored light mode COLOUR_DATA_V2 = "colour_data_v2" # Colored light mode + COOK_TEMPERATURE = "cook_temperature" + COOK_TIME = "cook_time" CONCENTRATION_SET = "concentration_set" # Concentration setting CONTROL = "control" CONTROL_2 = "control_2" @@ -295,6 +298,7 @@ class DPCode(StrEnum): RECORD_MODE = "record_mode" RECORD_SWITCH = "record_switch" # Recording switch RELAY_STATUS = "relay_status" + REMAIN_TIME = "remain_time" RESET_DUSTER_CLOTH = "reset_duster_cloth" RESET_EDGE_BRUSH = "reset_edge_brush" RESET_FILTER = "reset_filter" diff --git a/homeassistant/components/tuya/number.py b/homeassistant/components/tuya/number.py index bee5242d4ae..b1afeb0364c 100644 --- a/homeassistant/components/tuya/number.py +++ b/homeassistant/components/tuya/number.py @@ -9,6 +9,7 @@ from homeassistant.components.number import ( NumberEntityDescription, ) from homeassistant.config_entries import ConfigEntry +from homeassistant.const import TIME_MINUTES from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.helpers.entity import EntityCategory @@ -132,6 +133,28 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = { entity_category=EntityCategory.CONFIG, ), ), + # Sous Vide Cooker + # https://developer.tuya.com/en/docs/iot/categorymzj?id=Kaiuz2vy130ux + "mzj": ( + NumberEntityDescription( + key=DPCode.COOK_TEMPERATURE, + name="Cook Temperature", + icon="mdi:thermometer", + entity_category=EntityCategory.CONFIG, + ), + NumberEntityDescription( + key=DPCode.COOK_TIME, + name="Cook Time", + icon="mdi:timer", + unit_of_measurement=TIME_MINUTES, + entity_category=EntityCategory.CONFIG, + ), + NumberEntityDescription( + key=DPCode.CLOUD_RECIPE_NUMBER, + name="Cloud Recipe", + entity_category=EntityCategory.CONFIG, + ), + ), # Robot Vacuum # https://developer.tuya.com/en/docs/iot/fsd?id=K9gf487ck1tlo "sd": ( diff --git a/homeassistant/components/tuya/sensor.py b/homeassistant/components/tuya/sensor.py index acb2ffe7987..dd2996f61ba 100644 --- a/homeassistant/components/tuya/sensor.py +++ b/homeassistant/components/tuya/sensor.py @@ -18,6 +18,7 @@ from homeassistant.const import ( ELECTRIC_POTENTIAL_VOLT, PERCENTAGE, POWER_KILO_WATT, + TIME_MINUTES, ) from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.dispatcher import async_dispatcher_connect @@ -379,6 +380,27 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { # Door Window Sensor # https://developer.tuya.com/en/docs/iot/s?id=K9gf48hm02l8m "mcs": BATTERY_SENSORS, + # Sous Vide Cooker + # https://developer.tuya.com/en/docs/iot/categorymzj?id=Kaiuz2vy130ux + "mzj": ( + TuyaSensorEntityDescription( + key=DPCode.TEMP_CURRENT, + name="Current Temperature", + device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, + ), + TuyaSensorEntityDescription( + key=DPCode.STATUS, + name="Status", + device_class=TuyaDeviceClass.STATUS, + ), + TuyaSensorEntityDescription( + key=DPCode.REMAIN_TIME, + name="Remaining Time", + native_unit_of_measurement=TIME_MINUTES, + icon="mdi:timer", + ), + ), # PIR Detector # https://developer.tuya.com/en/docs/iot/categorypir?id=Kaiuz3ss11b80 "pir": BATTERY_SENSORS, diff --git a/homeassistant/components/tuya/switch.py b/homeassistant/components/tuya/switch.py index d587e8ea54b..37834f0f273 100644 --- a/homeassistant/components/tuya/switch.py +++ b/homeassistant/components/tuya/switch.py @@ -269,6 +269,16 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { entity_category=EntityCategory.CONFIG, ), ), + # Sous Vide Cooker + # https://developer.tuya.com/en/docs/iot/categorymzj?id=Kaiuz2vy130ux + "mzj": ( + SwitchEntityDescription( + key=DPCode.SWITCH, + name="Switch", + icon="mdi:pot-steam", + entity_category=EntityCategory.CONFIG, + ), + ), # Power Socket # https://developer.tuya.com/en/docs/iot/s?id=K9gf7o5prgf7s "pc": (