Explorar el Código

Add support for AF3W pet feeder.

Issue #2370
Jason Rumney hace 1 año
padre
commit
7e94374e82
Se han modificado 3 ficheros con 67 adiciones y 0 borrados
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 65 0
      custom_components/tuya_local/devices/af3w_petfeeder.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -746,3 +746,4 @@ Further device support has been made with the assistance of users. Please consid
 - [KyleStilkey](https://github.com/KyleStilkey) for assisting with support for GHome SW19 fan and light switch.
 - [johnnyaug](https://github.com/johnnyaug) for contributing improvements to Raykube/Gimdow A1 Pro locks.
 - [akc-kyiv](https://github.com/akc-kyiv) for contributing support for RZTK Aqua Pro humidifier.
+- [Whininie](https://github.com/Whininie) for assisting with support for AF3W pet feeder.

+ 1 - 0
DEVICES.md

@@ -764,6 +764,7 @@ port and password.
 
 ### Pet care
 
+- AF3W pet feeder
 - Catit Pixi smart fountain
 - Catit pet feeder (Pixi 2.2kg dispenser and 6 meal versions, and another non-Pixi branded single dispenser)
 - Ceres Plus pet feeder with camera

+ 65 - 0
custom_components/tuya_local/devices/af3w_petfeeder.yaml

@@ -0,0 +1,65 @@
+name: Pet feeder
+# products:
+#   - id: UNKNOWN
+#     name: TY-AF3W
+primary_entity:
+  entity: number
+  name: Servings
+  icon: "mdi:chicken-drumstick"
+  dps:
+    - id: 101
+      type: integer
+      optional: true
+      name: value
+      unit: portions
+      range:
+        min: 1
+        max: 10
+    - id: 104
+      type: string
+      optional: true
+      name: schedule
+secondary_entities:
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 102
+        type: bitfield
+        optional: true
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: true
+            constraint: feeding_fault
+            conditions:
+              - dps_val: 0
+                value: false
+              - dps_val: null
+                value: false
+          - dps_val: null
+            value: true
+            constraint: feeding_fault
+            conditions:
+              - dps_val: 0
+                value: false
+              - dps_val: null
+                value: false
+          - value: true
+      - id: 102
+        type: bitfield
+        optional: true
+        name: fault_code
+      - id: 103
+        type: bitfield
+        optional: true
+        name: feeding_fault
+  - entity: sensor
+    name: Last feed
+    category: diagnostic
+    dps:
+      - id: 105
+        type: integer
+        name: sensor
+        unit: portions
+        class: measurement