瀏覽代碼

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 小時之前
父節點
當前提交
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³"
         unit: "µg/m³"
         class: measurement
         class: measurement
 
 
+  - entity: sensor
+    class: pm10
+    category: diagnostic
+    dps:
+      - id: 102
+        type: integer
+        name: sensor
+        unit: ugm2
+        class: measurement
+
   - entity: sensor
   - entity: sensor
     translation_key: filter_life
     translation_key: filter_life
     category: diagnostic
     category: diagnostic
-    class: duration
     dps:
     dps:
-      - id: 105
+      - id: 104
         name: sensor
         name: sensor
         type: integer
         type: integer
-        unit: h
+        unit: "%"
+      - id: 105
+        name: hours_used
+        type: integer
 
 
   # -------------------------------------------------------
   # -------------------------------------------------------
   # Timer
   # Timer