Explorar o código

Aleco Air fault sensors

https://github.com/make-all/tuya-local/discussions/1199#discussioncomment-7377882
Mihai Ambrosie %!s(int64=2) %!d(string=hai) anos
pai
achega
662efb2235

+ 27 - 9
custom_components/tuya_local/devices/alecoair_d12_dehumidifier.yaml

@@ -46,19 +46,19 @@ primary_entity:
     - id: 19
     - id: 19
       name: error
       name: error
       type: bitfield
       type: bitfield
-      # Docs mention E1 and E2, it isn't clear which is tank full, so for now
-      # treat both as that.
+      # E2 might be a compressor fault.
       mapping:
       mapping:
         - dps_val: 0
         - dps_val: 0
           value: OK
           value: OK
+          icon: "mdi:cup-outline"
         - dps_val: 1
         - dps_val: 1
-          value: E1
+          value: "Water Tank Full or Removed"
           icon: "mdi:cup-water"
           icon: "mdi:cup-water"
-          icon_priority: 2
+          icon_priority: 1
         - dps_val: 2
         - dps_val: 2
-          value: E2
-          icon: "mdi:cup-water"
-          icon_priority: 2
+          value: "E2 Compressor Fault"
+          icon: "mdi:engine-off-outline"
+          icon_priority: 1
 secondary_entities:
 secondary_entities:
   - entity: fan
   - entity: fan
     dps:
     dps:
@@ -117,9 +117,23 @@ secondary_entities:
           - dps_val: true
           - dps_val: true
             icon: "mdi:hand-back-right-off"
             icon: "mdi:hand-back-right-off"
   - entity: binary_sensor
   - entity: binary_sensor
-    name: Tank
     class: problem
     class: problem
-    category: diagnostic
+    name: Tank full
+    icon: "mdi:cup-water"
+    optional: true
+    dps:
+      - id: 19
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 1
+            value: true
+          - value: false
+  - entity: binary_sensor
+    class: problem
+    name: Fault
+    icon: "mdi:engine-off-outline"
+    optional: true
     dps:
     dps:
       - id: 19
       - id: 19
         type: bitfield
         type: bitfield
@@ -127,4 +141,8 @@ secondary_entities:
         mapping:
         mapping:
           - dps_val: 0
           - dps_val: 0
             value: false
             value: false
+          - dps_val: 1
+            value: false
+          - dps_val: null
+            value: false
           - value: true
           - value: true