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

Sencor air conditioner: changes from code review

- move branding into products and follow HA naming convention
- move temperature_unit outside the climate entity, as it should only affect display
- remove hidden attribute on otherwise unused dp (it may be interesting to someone, so leave it as an extra attribute)
Jason Rumney 2 лет назад
Родитель
Сommit
4adc76feb7
1 измененных файлов с 16 добавлено и 6 удалено
  1. 16 6
      custom_components/tuya_local/devices/sencor_air_conditioner.yaml

+ 16 - 6
custom_components/tuya_local/devices/sencor_air_conditioner.yaml

@@ -1,7 +1,8 @@
-name: Sencor Air Conditioner
+name: Air conditioner
 products:
   - id: ypgwqvhjrl5chq6h
     model: SAC MT7048C Air Conditioner
+    manufacturer: Sencor
 primary_entity:
   entity: climate
   translation_key: aircon_extra
@@ -52,9 +53,6 @@ primary_entity:
           conditions:
             - dps_val: true
               invalid: true
-    - id: 19
-      name: temperature_unit
-      type: string
     - id: 22
       type: bitfield
       name: fault_code
@@ -69,7 +67,6 @@ primary_entity:
     - id: 103
       name: type
       type: string
-      hidden: true
 secondary_entities:
   - entity: binary_sensor
     name: Fault
@@ -82,4 +79,17 @@ secondary_entities:
         mapping:
           - dps_val: 0
             value: false
-          - value: true
+          - value: true
+  - entity: select
+    name: Display temperature unit
+    category: config
+    icon: "mdi:temperature-celsius"
+    dps:
+      - id: 19
+        name: option
+        type: string
+        mapping:
+          - dps_val: C
+            value: Celsius
+          - dps_val: F
+            value: Fahrenheit