Ver código fonte

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 1 mês atrás
pai
commit
3ad5e932dc

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

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