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

Petlibro feeder: make some dps optional

It seems this device is inconsistent about returning many dps.

Issue #759
Jason Rumney 2 лет назад
Родитель
Сommit
54e2415494
1 измененных файлов с 10 добавлено и 0 удалено
  1. 10 0
      custom_components/tuya_local/devices/petlibro_camera_feeder.yaml

+ 10 - 0
custom_components/tuya_local/devices/petlibro_camera_feeder.yaml

@@ -10,18 +10,22 @@ primary_entity:
     - id: 233
       type: string
       name: sensor
+      optional: true
     - id: 231
       type: hex
       name: schedule
     - id: 236
       type: bitfield
       name: fault_code
+      optional: true
     - id: 237
       type: string
       name: planned_feed_report
+      optional: true
     - id: 247
       type: string
       name: manual_feed_report
+      optional: true
 secondary_entities:
   - entity: switch
     name: Indicator
@@ -62,6 +66,7 @@ secondary_entities:
       - id: 111
         type: boolean
         name: button
+        optional: true
       - id: 110
         type: integer
         name: status
@@ -93,6 +98,7 @@ secondary_entities:
       - id: 150
         type: boolean
         name: record
+        optional: true
   - entity: switch
     name: Motion detection
     icon: "mdi:motion-sensor"
@@ -132,6 +138,7 @@ secondary_entities:
       - id: 140
         type: string
         name: option
+        optional: true
         mapping:
           - dps_val: "0"
             value: Low
@@ -184,6 +191,7 @@ secondary_entities:
       - id: 236
         type: bitfield
         name: sensor
+        optional: true
         mapping:
           - dps_val: 1
             value: true
@@ -196,6 +204,7 @@ secondary_entities:
       - id: 236
         type: bitfield
         name: sensor
+        optional: true
         mapping:
           - dps_val: 2
             value: true
@@ -208,6 +217,7 @@ secondary_entities:
       - id: 236
         type: bitfield
         name: sensor
+        optional: true
         mapping:
           - dps_val: 8
             value: true