Преглед на файлове

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