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

Soleusair air purifier: minor tweaks for final merge

- Make top level name generic
- Branded names need not repeat top level name
- fan: use presets with translations 8one additional to be defined)
- child lock; standardise icons per other devices
- formaldehyde sensor: scale value properly, use pre-defined ugm3 unit translation (likewise temperature use C)
Jason Rumney 2 лет назад
Родитель
Сommit
e59feaed36
1 измененных файлов с 13 добавлено и 20 удалено
  1. 13 20
      custom_components/tuya_local/devices/soleusair_air_purifier.yaml

+ 13 - 20
custom_components/tuya_local/devices/soleusair_air_purifier.yaml

@@ -1,10 +1,9 @@
-name: Soleusair Air Purifier
+name: Air purifier
 products:
 products:
   - id: kik7qavg2baebtk9
   - id: kik7qavg2baebtk9
-    name: Soleusair Air Purifier KJ1000F A10
+    name: Soleusair KJ1000F A10
   - id: 5xrkvysk7z6xrjum
   - id: 5xrkvysk7z6xrjum
-    name: Soleusair Air Purifier KJ760F A02
-
+    name: Soleusair KJ760F A02
 primary_entity:
 primary_entity:
   entity: fan
   entity: fan
   translation_key: fan_with_presets
   translation_key: fan_with_presets
@@ -26,27 +25,23 @@ primary_entity:
       type: string
       type: string
       mapping:
       mapping:
         - dps_val: manual
         - dps_val: manual
-          value: manual
+          value: normal
         - dps_val: auto
         - dps_val: auto
-          value: auto
+          value: smart
         - dps_val: sleep
         - dps_val: sleep
           value: sleep
           value: sleep
         - dps_val: displayoff
         - dps_val: displayoff
           value: displayoff
           value: displayoff
-
 secondary_entities:
 secondary_entities:
   - entity: sensor
   - entity: sensor
     name: Filter life
     name: Filter life
     category: diagnostic
     category: diagnostic
-    icon: "mdi:timelapse"
+    icon: "mdi:timelapse
     dps:
     dps:
       - id: 5
       - id: 5
         type: integer
         type: integer
         name: sensor
         name: sensor
-        # unit: "%"
-        range:
-          min: 0
-          max: 100
+        unit: "%"
   - entity: switch
   - entity: switch
     name: Ionizer
     name: Ionizer
     icon: "mdi:creation"
     icon: "mdi:creation"
@@ -64,9 +59,9 @@ secondary_entities:
         name: lock
         name: lock
         mapping:
         mapping:
           - dps_val: false
           - dps_val: false
-            icon: "mdi:shield-lock-open-outline"
+            icon: "mdi:hand-back-right"
           - dps_val: true
           - dps_val: true
-            icon: "mdi:shield-lock-outline"
+            icon: "mdi:hand-back-right-off"
   - entity: switch
   - entity: switch
     name: UV sterilization
     name: UV sterilization
     category: config
     category: config
@@ -82,7 +77,7 @@ secondary_entities:
       - id: 12
       - id: 12
         name: sensor
         name: sensor
         type: integer
         type: integer
-        unit: C"
+        unit: C
   - entity: sensor
   - entity: sensor
     class: humidity
     class: humidity
     dps:
     dps:
@@ -98,9 +93,6 @@ secondary_entities:
         name: sensor
         name: sensor
         optional: true
         optional: true
         unit: ppb
         unit: ppb
-        range:
-          min: 0
-          max: 6000
   - entity: sensor
   - entity: sensor
     name: Air quality
     name: Air quality
     icon: "mdi:approximately-equal"
     icon: "mdi:approximately-equal"
@@ -125,5 +117,6 @@ secondary_entities:
       - id: 27
       - id: 27
         type: integer
         type: integer
         name: sensor
         name: sensor
-        unit: "mg/m\u00b3"
-        scale: 2
+        unit: ugm3
+        mapping:
+         - scale: 0.1