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

Petlibro feeder: make some dps optional

It seems this device is inconsistent about returning many dps.

Issue #759
Jason Rumney пре 2 година
родитељ
комит
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
     - id: 233
       type: string
       type: string
       name: sensor
       name: sensor
+      optional: true
     - id: 231
     - id: 231
       type: hex
       type: hex
       name: schedule
       name: schedule
     - id: 236
     - id: 236
       type: bitfield
       type: bitfield
       name: fault_code
       name: fault_code
+      optional: true
     - id: 237
     - id: 237
       type: string
       type: string
       name: planned_feed_report
       name: planned_feed_report
+      optional: true
     - id: 247
     - id: 247
       type: string
       type: string
       name: manual_feed_report
       name: manual_feed_report
+      optional: true
 secondary_entities:
 secondary_entities:
   - entity: switch
   - entity: switch
     name: Indicator
     name: Indicator
@@ -62,6 +66,7 @@ secondary_entities:
       - id: 111
       - id: 111
         type: boolean
         type: boolean
         name: button
         name: button
+        optional: true
       - id: 110
       - id: 110
         type: integer
         type: integer
         name: status
         name: status
@@ -93,6 +98,7 @@ secondary_entities:
       - id: 150
       - id: 150
         type: boolean
         type: boolean
         name: record
         name: record
+        optional: true
   - entity: switch
   - entity: switch
     name: Motion detection
     name: Motion detection
     icon: "mdi:motion-sensor"
     icon: "mdi:motion-sensor"
@@ -132,6 +138,7 @@ secondary_entities:
       - id: 140
       - id: 140
         type: string
         type: string
         name: option
         name: option
+        optional: true
         mapping:
         mapping:
           - dps_val: "0"
           - dps_val: "0"
             value: Low
             value: Low
@@ -184,6 +191,7 @@ secondary_entities:
       - id: 236
       - id: 236
         type: bitfield
         type: bitfield
         name: sensor
         name: sensor
+        optional: true
         mapping:
         mapping:
           - dps_val: 1
           - dps_val: 1
             value: true
             value: true
@@ -196,6 +204,7 @@ secondary_entities:
       - id: 236
       - id: 236
         type: bitfield
         type: bitfield
         name: sensor
         name: sensor
+        optional: true
         mapping:
         mapping:
           - dps_val: 2
           - dps_val: 2
             value: true
             value: true
@@ -208,6 +217,7 @@ secondary_entities:
       - id: 236
       - id: 236
         type: bitfield
         type: bitfield
         name: sensor
         name: sensor
+        optional: true
         mapping:
         mapping:
           - dps_val: 8
           - dps_val: 8
             value: true
             value: true