Parcourir la source

fix(makeskyblue_mppt_charger): revert to standard problem binary_sensor

- Add description attribute instead of changing the sensor type to enum.
- Remove generic numbered descriptions
Jason Rumney il y a 6 mois
Parent
commit
932fd87810
1 fichiers modifiés avec 12 ajouts et 14 suppressions
  1. 12 14
      custom_components/tuya_local/devices/makeskyblue_mppt_charger.yaml

+ 12 - 14
custom_components/tuya_local/devices/makeskyblue_mppt_charger.yaml

@@ -78,14 +78,23 @@ entities:
         type: boolean
         name: switch
         optional: true
-  - entity: sensor
-    class: enum
+  - entity: binary_sensor
+    class: problem
     category: diagnostic
-    name: Problem
     dps:
       - id: 107
         type: bitfield
         name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+      - id: 107
+        type: bitfield
+        name: fault_code
+      - id: 107
+        type: bitfield
+        name: description
         mapping:
           - dps_val: 0
             value: ok
@@ -93,17 +102,6 @@ entities:
             value: Battery undervoltage
           - dps_val: 2
             value: Battery overvoltage
-          - dps_val: 4
-            value: alarm_3
-          - dps_val: 8
-            value: alarm_4
-          - dps_val: 16
-            value: alarm_5
-          - dps_val: 32
-            value: alarm_6
-      - id: 107  # fault code
-        type: bitfield
-        name: fault_code
   - entity: sensor
     class: energy
     category: diagnostic