소스 검색

BLE plant moisture: expose temperature unit select entity

These sensors seem to need to be prodded to get them to update sensor
values.  The only writable dp is the temperature unit, which
previously wasn't exposed.

Exposing it should allow an automation to be set up to set the
temperature unit periodically. I am not sure whether the underlying
select platform will filter out attempts to set the option to what it
already is, but hopefully it will not require setting to a different value
which might cause flickering in the UI.

Issue #1696, Discussion #1910
Jason Rumney 2 년 전
부모
커밋
44b1f5b197
1개의 변경된 파일12개의 추가작업 그리고 0개의 파일을 삭제
  1. 12 0
      custom_components/tuya_local/devices/ble_smart_plant_moisture.yaml

+ 12 - 0
custom_components/tuya_local/devices/ble_smart_plant_moisture.yaml

@@ -40,3 +40,15 @@ secondary_entities:
         type: integer
         name: sensor
         unit: "%"
+  - entity: select
+    translation_key: temperature_unit
+    category: config
+    dps:
+      - id: 9
+        type: string
+        name: option
+        mapping:
+          - dps_val: c
+            value: celsius
+          - dps_val: f
+            value: fahrenheit