From 58591a860bd2c47c6fa5f5f2f55a193751f3b1bd Mon Sep 17 00:00:00 2001 From: Ezequiel Krause Date: Fri, 12 Jul 2024 15:17:42 -0300 Subject: [PATCH 1/3] Added support for V330L-DU4L-VS pet feeder --- .../devices/v330l_DU4L_petfeeder.yaml | 166 ++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml diff --git a/custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml b/custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml new file mode 100644 index 0000000000..b4f5347e4d --- /dev/null +++ b/custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml @@ -0,0 +1,166 @@ +name: Pet feeder +products: + - id: cjrm04np59ut4pwb + name: V330L-DU4L-VS Petfeeder + # Needs to be added using the 3.2 protocol +primary_entity: + entity: number + name: Manual feed + icon: "mdi:food-drumstick" + dps: + - id: 201 + type: integer + name: value + unit: portions + optional: true + persist: false + range: + min: 0 + max: 10 + - id: 202 + type: integer + name: food_weight + optional: true + mapping: + - scale: 10 + - id: 203 + type: integer + name: control + optional: true + - id: 204 + type: integer + name: realtime_data + optional: true + - id: 205 + type: integer + name: weight + optional: true + - id: 207 + type: string + name: schedule + optional: true + - id: 208 + type: string + name: voice_record + optional: true +secondary_entities: + - entity: light + translation_key: indicator + category: config + dps: + - id: 101 + type: boolean + name: switch + - entity: switch + name: Flip + icon: "mdi:flip-horizontal" + category: config + dps: + - id: 103 + type: boolean + name: switch + optional: true + - entity: switch + name: Timestamp + icon: "mdi:clock-time-eight" + category: config + dps: + - id: 104 + type: boolean + name: switch + optional: true + - entity: switch + name: Motion notification + icon: "mdi:motion-sensor" + category: config + dps: + - id: 134 + type: boolean + name: switch + optional: true + - entity: select + name: Motion sensitivity + icon: "mdi:motion-sensor" + category: config + dps: + - id: 106 + type: string + name: option + optional: true + mapping: + - dps_val: "0" + value: Low + - dps_val: "1" + value: Medium + - dps_val: "2" + value: High + - entity: select + name: Nightvision + icon: "mdi:weather-night" + category: config + dps: + - id: 108 + type: string + name: option + optional: true + mapping: + - dps_val: "0" + value: Auto + - dps_val: "1" + value: "Off" + - dps_val: "2" + value: "On" + - entity: binary_sensor + name: Food empty + class: problem + category: diagnostic + dps: + - id: 206 + type: bitfield + name: sensor + optional: true + mapping: + - dps_val: 1 + value: true + - value: false + - entity: binary_sensor + name: Not enough food + class: problem + category: diagnostic + dps: + - id: 206 + type: bitfield + name: sensor + optional: true + mapping: + - dps_val: 2 + value: true + - value: false + - entity: binary_sensor + name: Blocked + class: problem + category: diagnostic + dps: + - id: 206 + type: bitfield + name: sensor + optional: true + mapping: + - dps_val: 4 + value: true + - value: false + - entity: camera + dps: + - id: 113 + type: boolean + optional: true + name: record + mapping: + - dps_val: null + value: false + hidden: true + - id: 115 + type: base64 + name: snapshot + optional: true + sensitive: true From 7949fe524ae7bc1e9851c8a72366d7b2b4b8e373 Mon Sep 17 00:00:00 2001 From: Ezequiel Krause Date: Mon, 15 Jul 2024 09:27:31 -0300 Subject: [PATCH 2/3] Update v330l_DU4L_petfeeder.yaml Camera sensor to generic text sensor --- .../tuya_local/devices/v330l_DU4L_petfeeder.yaml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml b/custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml index b4f5347e4d..87ae4b564c 100644 --- a/custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml +++ b/custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml @@ -149,18 +149,12 @@ secondary_entities: - dps_val: 4 value: true - value: false - - entity: camera + - entity: sensor + name: Snapshot data + category: diagnostic dps: - - id: 113 - type: boolean - optional: true - name: record - mapping: - - dps_val: null - value: false - hidden: true - id: 115 type: base64 - name: snapshot + name: sensor optional: true sensitive: true From eb2011b830f7468c4587cc6c0a8b30a61a395bcc Mon Sep 17 00:00:00 2001 From: Ezequiel Krause Date: Wed, 17 Jul 2024 09:00:39 -0300 Subject: [PATCH 3/3] Update v330l_DU4L_petfeeder.yaml --- .../devices/v330l_DU4L_petfeeder.yaml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml b/custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml index 87ae4b564c..316414dbbc 100644 --- a/custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml +++ b/custom_components/tuya_local/devices/v330l_DU4L_petfeeder.yaml @@ -149,12 +149,19 @@ secondary_entities: - dps_val: 4 value: true - value: false - - entity: sensor - name: Snapshot data - category: diagnostic + - entity: switch + name: Record + icon: "mdi:record-rec" + category: config dps: + - id: 113 + type: boolean + optional: true + name: switch + mapping: + - dps_val: null + value: false - id: 115 type: base64 - name: sensor + name: snapshot_data optional: true - sensitive: true