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

BLE Plant Moisture: Only use unit dp as read-only units

It does not need to be a human readable sensor, but assume it reports correctly even though it doesn't seem possible to change it, and use if for the temperature unit.

PR #1696
Jason Rumney 1 год назад
Родитель
Сommit
2509320262
1 измененных файлов с 5 добавлено и 11 удалено
  1. 5 11
      custom_components/tuya_local/devices/ble_smart_plant_moisture.yaml

+ 5 - 11
custom_components/tuya_local/devices/ble_smart_plant_moisture.yaml

@@ -21,20 +21,14 @@ secondary_entities:
         type: integer
         class: measurement
         mapping:
-          - scale: 10
-        unit: C
-  - entity: sensor
-    name: Temperature unit
-    category: diagnostic
-    dps:
+          - scale: 10  
       - id: 9
-        name: option
+        name: unit
         type: string
         mapping:
-          - dps_val: "f"
-            value: fahrenheit
-          - dps_val: "c"
-            value: celsius
+          - dps_val: f
+            value: F
+          - value: C
   - entity: sensor
     class: battery
     category: diagnostic