Переглянути джерело

feat(sailesi_litterbox): improve compatibility with GoDrone model

PR #5333
Jason Rumney 2 тижнів тому
батько
коміт
6d5805c25f

+ 21 - 0
custom_components/tuya_local/devices/sailesi_litterbox.yaml

@@ -46,10 +46,20 @@ entities:
     name: Deodorization
     name: Deodorization
     icon: "mdi:spray"
     icon: "mdi:spray"
     category: config
     category: config
+    hidden: unavailable
     dps:
     dps:
       - id: 17
       - id: 17
         type: boolean
         type: boolean
+        optional: true
         name: switch
         name: switch
+      - id: 17
+        type: boolean
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
   - entity: binary_sensor
   - entity: binary_sensor
     class: problem
     class: problem
     category: diagnostic
     category: diagnostic
@@ -160,6 +170,7 @@ entities:
       # 109 Clean_tasteSwitch: Chinese name translates to Alternate version id
       # 109 Clean_tasteSwitch: Chinese name translates to Alternate version id
       - id: 109
       - id: 109
         type: boolean
         type: boolean
+        optional: true
         name: clean_taste_sw
         name: clean_taste_sw
   - entity: text
   - entity: text
     name: Do not disturb schedule
     name: Do not disturb schedule
@@ -259,10 +270,20 @@ entities:
   - entity: switch
   - entity: switch
     translation_key: do_not_disturb
     translation_key: do_not_disturb
     category: config
     category: config
+    hidden: unavailable
     dps:
     dps:
       - id: 122
       - id: 122
         type: boolean
         type: boolean
         name: switch
         name: switch
+        optional: true
+      - id: 122
+        type: boolean
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
   - entity: sensor
   - entity: sensor
     name: Usage
     name: Usage
     category: diagnostic
     category: diagnostic