Pārlūkot izejas kodu

fix(igenix_ig9901wifi_airconditioner): use translations, change attributes

- remove timer attribute on climate entity, as the timer is already exposed as an entity
- add fault_code attribute to problem sensor to expose raw value
- remove name from problem sensor to use class translations.
- change name to translation_key for time remaining and temperature unit to use translations.

PR #3488
Jason Rumney 6 mēneši atpakaļ
vecāks
revīzija
943b10f9b6

+ 9 - 11
custom_components/tuya_local/devices/igenix_ig9901wifi_airconditioner.yaml

@@ -32,7 +32,6 @@ entities:
       - id: 3
         name: current_temperature
         type: integer
-        unit: C
       - id: 4
         name: mode
         type: string
@@ -60,16 +59,12 @@ entities:
         type: boolean
         mapping:
           - dps_val: true
-            value: vertical
+            value: "on"
           - dps_val: false
             value: "off"
-      - id: 103
-        name: timer
-        optional: true
-        type: integer
 
   - entity: select
-    name: Temperature Unit
+    translation_key: temperature_unit
     category: config
     dps:
       - id: 19
@@ -77,12 +72,13 @@ entities:
         type: string
         mapping:
           - dps_val: C
-            value: Celsius
+            value: celsius
           - dps_val: F
-            value: Fahrenheit
+            value: fahrenheit
 
   - entity: sensor
-    name: Time Remaining
+    translation_key: time_remaining
+    class: duration
     category: diagnostic
     dps:
       - id: 105
@@ -91,7 +87,6 @@ entities:
         unit: min
 
   - entity: binary_sensor
-    name: Fault Indicator
     category: diagnostic
     class: problem
     dps:
@@ -102,6 +97,9 @@ entities:
           - dps_val: 0
             value: false
           - value: true
+      - id: 106
+        type: bitfield
+        name: fault_code
 
   - entity: select
     translation_key: timer