Преглед изворни кода

Fix mypin_6l_videopetfeeder, added various compatible models (#5401)

* Fix mypin_6l_videopetfeeder: rename DP245 to Manual feed, add persist:false, add Meal plan text entity

* Add multiple compatible manufacturers pet feeder

Mypin 6l is the same as Pretty Paws PP003 and Petrust PP003 and Lexmart PP003. These models should now be recognised

* Refactor product entries and update Meal plan translation

Removed duplicate product entries for Pretty Paws, Petrust, and Lexmart. Updated translation key for Meal plan entity.

* Update translation keys for Meal plan and Manual feed

- `translation_key: manual_feed` applied as requested.
- For the `text` entity on DP 237: `translation_key: meal_plan` does not exist 
  in the tuya-local translations, so reverted to `name: Meal plan`.

* Update Meal plan to use translation key

since it turns out that a translation key exists for that

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
Paul de Wit пре 1 недеља
родитељ
комит
775cfd9d30
1 измењених фајлова са 16 додато и 9 уклоњено
  1. 16 9
      custom_components/tuya_local/devices/mypin_6l_videopetfeeder.yaml

+ 16 - 9
custom_components/tuya_local/devices/mypin_6l_videopetfeeder.yaml

@@ -195,14 +195,17 @@ entities:
         range:
           min: 0
           max: 255
-      - id: 237
-        type: string
-        optional: true
-        name: schedule
       - id: 247
         type: string
         optional: true
         name: backup_log
+  - entity: text
+    translation_key: meal_plan
+    dps:
+      - id: 237
+        type: string
+        name: value
+        optional: true
   - entity: sensor
     class: battery
     category: diagnostic
@@ -306,18 +309,22 @@ entities:
         mapping:
           - scale: 10
   - entity: number
-    name: Log offline feed
-    category: config
+    translation_key: manual_feed
     icon: "mdi:food-drumstick"
     dps:
       - id: 245
         type: integer
-        optional: true
         name: value
+        optional: true
+        persist: false
         unit: portions
         range:
-          min: 0
-          max: 99
+          min: 1
+          max: 10
+        mapping:
+          - dps_val: -2000
+            hidden: true
+            value: 0
   - entity: event
     name: Feed
     icon: "mdi:food-drumstick"