Просмотр исходного кода

feat!(smartmi_air_purifier): change filter life to percentage

- current dp assigned to filter life is apparently an "hours used" rather
  than hours remaining, so percentage is a more appropriate "filter life" sensor
  Move the hours used to an attribute.
- add pm10 filter.

Both these are showing in the original logs on #4190

Issue #6202
Jason Rumney 7 часов назад
Родитель
Сommit
eef0157ae6
1 измененных файлов с 15 добавлено и 3 удалено
  1. 15 3
      custom_components/tuya_local/devices/smartmi_air_purifier_p1.yaml

+ 15 - 3
custom_components/tuya_local/devices/smartmi_air_purifier_p1.yaml

@@ -54,15 +54,27 @@ entities:
         unit: "µg/m³"
         class: measurement
 
+  - entity: sensor
+    class: pm10
+    category: diagnostic
+    dps:
+      - id: 102
+        type: integer
+        name: sensor
+        unit: ugm2
+        class: measurement
+
   - entity: sensor
     translation_key: filter_life
     category: diagnostic
-    class: duration
     dps:
-      - id: 105
+      - id: 104
         name: sensor
         type: integer
-        unit: h
+        unit: "%"
+      - id: 105
+        name: hours_used
+        type: integer
 
   # -------------------------------------------------------
   # Timer