Ver Fonte

AQI is deprecated. Fix by changing to a string with mappings.

Thomas Davis há 1 ano atrás
pai
commit
3fed0fe2ca

+ 8 - 1
custom_components/tuya_local/devices/renpho_rp_ap001s.yaml

@@ -70,12 +70,19 @@ secondary_entities:
         type: boolean
   - entity: sensor
     name: Air quality
-    class: aqi
+    class: enum
     category: diagnostic
     dps:
       - id: 22
         type: string
         name: sensor
+        mapping:
+          - dps_val: "bad"
+            value: "Bad"
+          - dps_val: "fair"
+            value: "Fair"
+          - dps_val: "good"
+            value: "Good"
   - entity: sensor
     name: Prefilter life
     category: diagnostic