Просмотр исходного кода

Catit pixi smart feeder: Add optional binary sensors for fault states

Original PR #757 did not mention dp 14, but PR #960 for seemingly compatible
Nutri Meal has it in the log, and in the device description along with some
dps 101 and up which do not appear in the log, and are not added.
These are optional, so their absense will just report no problems if the
original Catit device does not support the fault reporting.
Jason Rumney 2 лет назад
Родитель
Сommit
e3393e943a
1 измененных файлов с 30 добавлено и 1 удалено
  1. 30 1
      custom_components/tuya_local/devices/catit_pixi_smart_feeder.yaml

+ 30 - 1
custom_components/tuya_local/devices/catit_pixi_smart_feeder.yaml

@@ -1,4 +1,7 @@
-name: Catit Pixi Smart Feeder
+name: Pet feeder
+products:
+  - id: 8vwr6rfoaaxncjwj
+    name: Petoneer Nutri Mini
 primary_entity:
   entity: button
   name: Quick Feed
@@ -43,3 +46,29 @@ secondary_entities:
           min: 1
           max: 12
         optional: false
+  - entity: binary_sensor
+    name: Food shortage
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 14 
+        type: bitfield
+        name: sensor
+        optional: true
+        mapping:
+          - dps_val: 2
+            value: true
+          - value: false
+  - entity: binary_sensor
+    name: Food blockage
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 14 
+        type: bitfield
+        name: sensor
+        optional: true
+        mapping:
+          - dps_val: 4
+            value: true
+          - value: false