瀏覽代碼

Review comments incorporated

Changes made:
- Name shortened
- Removed Removed dynamic icons and added static icons where necessary
- Removed name from temperature sensor
- Converted time remaining attribute to a sensor
- Entity names adapted to HA naming convention
FSJHecker 2 年之前
父節點
當前提交
bf6e056916
共有 1 個文件被更改,包括 12 次插入22 次删除
  1. 12 22
      custom_components/tuya_local/devices/cleanair_604b_humidifier.yaml

+ 12 - 22
custom_components/tuya_local/devices/cleanair_604b_humidifier.yaml

@@ -1,7 +1,7 @@
 name: Humidifier
 name: Humidifier
 products:
 products:
   - id: cqoisddoci9i3yer
   - id: cqoisddoci9i3yer
-    name: Clean Air Optima CA-604B Smart Top Filling
+    name: Clean Air 604B Smart
 primary_entity:
 primary_entity:
   entity: humidifier
   entity: humidifier
   dps:
   dps:
@@ -10,7 +10,6 @@ primary_entity:
       type: boolean
       type: boolean
       mapping:
       mapping:
         - dps_val: false
         - dps_val: false
-          icon: mdi:air-humidifier-off
           icon_priority: 2
           icon_priority: 2
     - id: 13
     - id: 13
       name: humidity
       name: humidity
@@ -18,7 +17,6 @@ primary_entity:
       range:
       range:
         min: 30
         min: 30
         max: 75
         max: 75
-        step: 5
     - id: 14
     - id: 14
       name: current_humidity
       name: current_humidity
       type: integer
       type: integer
@@ -28,38 +26,28 @@ primary_entity:
       mapping:
       mapping:
         - dps_val: auto
         - dps_val: auto
           value: auto
           value: auto
-          icon: mdi:refresh-auto
           icon_priority: 3
           icon_priority: 3
         - dps_val: level1
         - dps_val: level1
           value: low
           value: low
-          icon: mdi:speedometer-slow
           icon_priority: 3
           icon_priority: 3
         - dps_val: level2
         - dps_val: level2
           value: middle
           value: middle
-          icon: mdi:speedometer-medium
           icon_priority: 3
           icon_priority: 3
         - dps_val: level3
         - dps_val: level3
           value: high
           value: high
-          icon: mdi:speedometer
           icon_priority: 3
           icon_priority: 3
         - dps_val: sleep
         - dps_val: sleep
           value: sleep
           value: sleep
-          icon: mdi:sleep
           icon_priority: 3
           icon_priority: 3
 secondary_entities:
 secondary_entities:
   - entity: switch
   - entity: switch
     name: Sound
     name: Sound
+    icon: mdi:volume-high
     dps:
     dps:
       - id: 8
       - id: 8
         name: switch
         name: switch
         type: boolean
         type: boolean
-        mapping:
-          - dps_val: true
-            icon: mdi:volume-high
-          - dps_val: false
-            icon: mdi:volume-off
   - entity: sensor
   - entity: sensor
-    name: Current Temperature
     class: temperature
     class: temperature
     dps:
     dps:
       - id: 10
       - id: 10
@@ -100,12 +88,17 @@ secondary_entities:
             value: 11 hours
             value: 11 hours
           - dps_val: 12h
           - dps_val: 12h
             value: 12 hours
             value: 12 hours
+  - entity: sensor
+    name: Time remaining
+    class: duration
+    dps:
       - id: 20
       - id: 20
-        name: remaining
+        name: sensor
         type: integer
         type: integer
-        optional: true
+        unit: min
   - entity: binary_sensor
   - entity: binary_sensor
-    name: Watertank Empty
+    name: Watertank empty
+    icon: mdi:water-remove
     class: problem
     class: problem
     category: diagnostic
     category: diagnostic
     dps:
     dps:
@@ -115,11 +108,10 @@ secondary_entities:
         mapping:
         mapping:
           - dps_val: 1
           - dps_val: 1
             value: true
             value: true
-            icon: mdi:water-remove
           - value: false
           - value: false
-            icon: mdi:water
   - entity: binary_sensor
   - entity: binary_sensor
-    name: Watertank Overfilled
+    name: Watertank overflow
+    icon: mdi:liquid-spot
     class: problem
     class: problem
     category: diagnostic
     category: diagnostic
     dps:
     dps:
@@ -129,9 +121,7 @@ secondary_entities:
         mapping:
         mapping:
           - dps_val: 2
           - dps_val: 2
             value: true
             value: true
-            icon: mdi:liquid-spot
           - value: false
           - value: false
-            icon: mdi:water
   - entity: switch
   - entity: switch
     name: Ionizer
     name: Ionizer
     icon: mdi:creation
     icon: mdi:creation