소스 검색

temperature unit dpid added as part of temperature sensor

Piotr Szulc 1 년 전
부모
커밋
5bf23cb911
1개의 변경된 파일9개의 추가작업 그리고 1개의 파일을 삭제
  1. 9 1
      custom_components/tuya_local/devices/woox_r7246_ir_remote_with_th_sensor.yaml

+ 9 - 1
custom_components/tuya_local/devices/woox_r7246_ir_remote_with_th_sensor.yaml

@@ -9,10 +9,18 @@ entities:
       - id: 2
       - id: 2
         name: sensor
         name: sensor
         type: integer
         type: integer
-        unit: C
         mapping:
         mapping:
           - scale: 10
           - scale: 10
         class: measurement
         class: measurement
+      - id: 11
+        name: unit
+        type: string
+        mapping:
+          - dps_val: "c"
+            value: "C"
+          - dps_val: "f"
+            value: "F"
+        optional: true
   - entity: select
   - entity: select
     translation_key: temperature_unit
     translation_key: temperature_unit
     category: config
     category: config