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

Fix issues raised by @make-all

Onvisoc 2 лет назад
Родитель
Сommit
3dec585e21

+ 6 - 8
custom_components/tuya_local/devices/soho_air_purifier.yaml

@@ -11,9 +11,9 @@ primary_entity:
       type: string
       mapping:
         - dps_val: auto
-          value: auto
+          value: smart
         - dps_val: manual
-          value: manual
+          value: normal
         - dps_val: sleep
           value: sleep
     - id: 4
@@ -41,14 +41,14 @@ secondary_entities:
       - id: 9
         type: boolean
         name: switch
-  - entity: switch
+  - entity: lock
     translation_key: child_lock
     category: config
     dps:
      - id: 7
        type: boolean
-       name: switch
-  - entity: switch
+       name: lock
+  - entity: light
     translation_key: backlight
     category: config
     dps:
@@ -63,8 +63,7 @@ secondary_entities:
        type: boolean
        name: switch
   - entity: select
-    name: Timer
-    icon: mdi:timer
+    translation_key: timer
     category: config
     dps:
       - id: 18
@@ -113,7 +112,6 @@ secondary_entities:
         - dps_val: difference
           value: Bad
   - entity: sensor
-    transation_key: pm25
     class: pm25
     dps:
      - id: 2

+ 2 - 11
custom_components/tuya_local/icons.json

@@ -84,9 +84,6 @@
         "sensor": {
             "time_remaining": {
                 "default": "mdi:timer"
-            },
-            "pm25": {
-                "default": "mdi:molecule"
             }
         },
         "switch": {
@@ -101,12 +98,6 @@
             },
             "keytone": {
                 "default": "mdi:bell-ring"
-            },
-            "child_lock": {
-                "default": "mdi:lock"
-            },
-            "backlight": {
-                "default": "mdi:wall-sconce-flat-variant"
             }
         },
         "fan": {
@@ -114,8 +105,8 @@
                 "state_attributes": {
                     "preset_mode": {
                         "state": {
-                            "auto": "mdi:fan-auto",
-                            "manual": "mdi:wrench",
+                            "smart": "mdi:auto-mode",
+                            "normal": "mdi:fan",
                             "sleep": "mdi:sleep"
                         }
                     }

+ 0 - 11
custom_components/tuya_local/translations/en.json

@@ -234,8 +234,6 @@
                 "state_attributes": {
                     "preset_mode": {
                         "state": {
-                            "auto": "Auto",
-                            "manual": "Manual",
                             "normal": "Normal",
                             "nature": "Natural",
                             "sleep": "Sleep",
@@ -315,9 +313,6 @@
         "sensor": {
             "time_remaining": {
                 "name": "Time remaining"
-            },
-            "pm25": {
-                "name": "PM2.5"
             }
         },
         "switch": {
@@ -333,14 +328,8 @@
             "evaporator_cleaning": {
                 "name": "Evaporator cleaning"
             },
-            "backlight": {
-                "name": "Backlight"
-            },
             "keytone": {
                 "name": "Keytone"
-            },
-            "child_lock": {
-                "name": "Child Lock"
             }
         }
     }