소스 검색

refactor(soil moisture sensors): use correct device class

Soil moisture should have a device class of moisture, not humidity.
Jason Rumney 8 달 전
부모
커밋
da2488b379

+ 9 - 0
custom_components/tuya_local/devices/asip_0622_planter.yaml

@@ -40,6 +40,15 @@ entities:
         # format: min,max
   - entity: sensor
     class: humidity
+    deprecated: sensor_moisture
+    dps:
+      - id: 7
+        type: integer
+        name: sensor
+        unit: "%"
+        class: measurement
+  - entity: sensor
+    class: moisture
     dps:
       - id: 7
         type: integer

+ 1 - 1
custom_components/tuya_local/devices/holman_wx1_taptimer.yaml

@@ -31,7 +31,7 @@ entities:
         type: boolean
   - entity: sensor
     name: Soil moisture
-    class: humidity
+    class: moisture
     category: diagnostic
     dps:
       - id: 102

+ 2 - 2
custom_components/tuya_local/devices/holman_wx2_taptimer.yaml

@@ -39,7 +39,7 @@ entities:
         unit: C
   - entity: sensor
     name: Soil moisture 1
-    class: humidity
+    class: moisture
     category: diagnostic
     dps:
       - id: 102
@@ -467,7 +467,7 @@ entities:
         unit: C
   - entity: sensor
     name: Soil moisture 2
-    class: humidity
+    class: moisture
     category: diagnostic
     dps:
       - id: 151