Преглед изворни кода

fix(feyree_ev_portable_charger): remove some unnecessary mappings

- consistently use single quotes
- remove mappings that do not map to anything (I think these were
  originally included only to record the valid values, but since they
  are only extra attributes, they are not needed.

Issue #5056
 - none of these nor the other removals in the user contributed config there
   should have any effect on the communication errors reported, but the config
   could still do with some cleanup.
Jason Rumney пре 2 дана
родитељ
комит
3ad5e932dc
1 измењених фајлова са 1 додато и 24 уклоњено
  1. 1 24
      custom_components/tuya_local/devices/feyree_ev_portable_charger.yaml

+ 1 - 24
custom_components/tuya_local/devices/feyree_ev_portable_charger.yaml

@@ -37,24 +37,10 @@ entities:
         type: string
         optional: true
         name: work_state
-        mapping:
-          - dps_val: charger_free
-          - dps_val: charger_insert
-          - dps_val: charger_free_fault
-          - dps_val: charger_wait
-          - dps_val: charger_charging
-          - dps_val: charger_pause
-          - dps_val: charger_end
-          - dps_val: charger_fault
       - id: 14
         type: string
         optional: true
         name: work_mode
-        mapping:
-          - dps_val: charge_now
-          - dps_val: charge_pct
-          - dps_val: charge_energy
-          - dps_val: charge_schedule
       - id: 23
         type: string
         optional: true
@@ -65,7 +51,7 @@ entities:
         name: phase_info
   - entity: binary_sensor
     class: problem
-    icon: 'mdi:alert-outline'
+    icon: "mdi:alert-outline"
     dps:
       - id: 10
         type: bitfield
@@ -194,19 +180,10 @@ entities:
             conditions:
               - dps_val: Max32A
                 value_redirect: value_32a
-                range:
-                  min: 6
-                  max: 32
               - dps_val: Max40A
                 value_redirect: value_40a
-                range:
-                  min: 8
-                  max: 40
               - dps_val: Max50A
                 value_redirect: value_50a
-                range:
-                  min: 8
-                  max: 50
                   # - dps_val: Max60A
                   #   value_redirect: value_60a
                   # - dps_val: Max80A