Selaa lähdekoodia

cleanup! (devices): standardise various mode selects.

Breaking change, as entity ids and option values are changed. As there
is not a simple 1-to-1 mapping for the new ids, and multiple source
ids and independently multiple target ids, migration is difficult and
would anyway not take care of value changes in existing automations.

Uses the translations from previous commit.

Issue #1708
Jason Rumney 2 kuukautta sitten
vanhempi
commit
776184a553
43 muutettua tiedostoa jossa 159 lisäystä ja 203 poistoa
  1. 6 7
      custom_components/tuya_local/devices/afyeev_evcharger.yaml
  2. 2 2
      custom_components/tuya_local/devices/amenzo_mini_dishwasher.yaml
  3. 3 3
      custom_components/tuya_local/devices/ble_solar_light.yaml
  4. 2 3
      custom_components/tuya_local/devices/blitzhome_bhcdw1_dishwasher.yaml
  5. 1 4
      custom_components/tuya_local/devices/brilliant_outdoor_pirswitch.yaml
  6. 1 4
      custom_components/tuya_local/devices/brilliant_securitylights.yaml
  7. 5 6
      custom_components/tuya_local/devices/dowell_dchs-k7_32_7kw_ev_charger.yaml
  8. 3 4
      custom_components/tuya_local/devices/duoqu_selfcleaning_litterbox.yaml
  9. 3 2
      custom_components/tuya_local/devices/easybaby_gs801_milkmaker.yaml
  10. 4 5
      custom_components/tuya_local/devices/ecopoint_ev_charger.yaml
  11. 2 3
      custom_components/tuya_local/devices/etna_vw644mc_dishwasher.yaml
  12. 5 6
      custom_components/tuya_local/devices/hapaw_pet_fountain.yaml
  13. 4 5
      custom_components/tuya_local/devices/ilife_v20_vacuum.yaml
  14. 3 4
      custom_components/tuya_local/devices/kanchou_petfountain.yaml
  15. 5 6
      custom_components/tuya_local/devices/kesser_infrared_heater.yaml
  16. 5 6
      custom_components/tuya_local/devices/kesser_infrared_heater_floodlights.yaml
  17. 3 4
      custom_components/tuya_local/devices/klarstein_amazonia_dishwasher.yaml
  18. 4 5
      custom_components/tuya_local/devices/kogan_bidet.yaml
  19. 4 5
      custom_components/tuya_local/devices/lublueblu_sl60d_vacuum.yaml
  20. 3 4
      custom_components/tuya_local/devices/m027_curtain.yaml
  21. 5 6
      custom_components/tuya_local/devices/madimack_inverchlor_chlorinator.yaml
  22. 3 4
      custom_components/tuya_local/devices/minib_public_litterbox.yaml
  23. 3 4
      custom_components/tuya_local/devices/moes_single_watertimer.yaml
  24. 2 2
      custom_components/tuya_local/devices/moes_temp_humidity.yaml
  25. 1 1
      custom_components/tuya_local/devices/mrpure_saltchlorinator.yaml
  26. 7 7
      custom_components/tuya_local/devices/orion_indoor_siren.yaml
  27. 3 3
      custom_components/tuya_local/devices/petoneer_fresco_ezgo_petfountain.yaml
  28. 3 5
      custom_components/tuya_local/devices/petrust_tkwf002_petfountain.yaml
  29. 4 8
      custom_components/tuya_local/devices/proscenic_m9_vacuum.yaml
  30. 4 7
      custom_components/tuya_local/devices/qlima_d820a_dehumidifier.yaml
  31. 3 5
      custom_components/tuya_local/devices/quad_temphumidity_switch.yaml
  32. 6 7
      custom_components/tuya_local/devices/sevr_x1_evcharger.yaml
  33. 3 4
      custom_components/tuya_local/devices/smart_watering_device.yaml
  34. 6 7
      custom_components/tuya_local/devices/tera_w01_evcharger.yaml
  35. 6 7
      custom_components/tuya_local/devices/vevor_3_7kw_evcharger.yaml
  36. 6 7
      custom_components/tuya_local/devices/vevor_ev_charger.yaml
  37. 6 7
      custom_components/tuya_local/devices/vevor_l2_ev_charger.yaml
  38. 6 7
      custom_components/tuya_local/devices/wadapower_q8_evcharger.yaml
  39. 5 6
      custom_components/tuya_local/devices/wouej_evcharger.yaml
  40. 3 3
      custom_components/tuya_local/devices/zemismart_roller_shade_zm25r2.yaml
  41. 1 2
      custom_components/tuya_local/devices/zemismart_zm85el1x_rollershade.yaml
  42. 1 2
      custom_components/tuya_local/devices/zmp71sh_pool_pump.yaml
  43. 4 4
      tests/devices/test_m027_curtain.py

+ 6 - 7
custom_components/tuya_local/devices/afyeev_evcharger.yaml

@@ -138,23 +138,22 @@ entities:
           - dps_val: 16384
             value: "Leakage current fault"
   - entity: select
-    name: Working mode
-    icon: "mdi:list-box-outline"
+    name: charging_mode
     dps:
       - id: 14
         type: string
         name: option
         mapping:
           - dps_val: charge_now
-            value: Charge now
+            value: immediate
           - dps_val: charge_pct
-            value: Charge PCT
+            value: charge_to_percent
           - dps_val: charge_energy
-            value: Charge energy
+            value: fixed_charge
           - dps_val: charge_schedule
-            value: Charge schedule
+            value: scheduled_charge
           - dps_val: charge_delay
-            value: Charge delay
+            value: delayed_charge
   - entity: switch
     dps:
       - id: 18

+ 2 - 2
custom_components/tuya_local/devices/amenzo_mini_dishwasher.yaml

@@ -23,7 +23,7 @@ entities:
         type: boolean
         name: button
   - entity: select
-    name: Mode
+    translation_key: washing_mode
     category: config
     dps:
       - id: 6
@@ -40,7 +40,7 @@ entities:
           - dps_val: Eco
             value: eco
           - dps_val: Normal
-            value: normal
+            value: standard
   - entity: sensor
     translation_key: status
     class: enum

+ 3 - 3
custom_components/tuya_local/devices/ble_solar_light.yaml

@@ -109,7 +109,7 @@ entities:
           - scale: 60
             step: 60
   - entity: select
-    name: Device mode
+    name: mode
     icon: "mdi:lightbulb-auto"
     category: config
     dps:
@@ -118,9 +118,9 @@ entities:
         name: option
         mapping:
           - dps_val: auto
-            value: Auto
+            value: auto
           - dps_val: manual
-            value: Manual
+            value: manual
   - entity: event
     class: motion
     category: diagnostic

+ 2 - 3
custom_components/tuya_local/devices/blitzhome_bhcdw1_dishwasher.yaml

@@ -30,8 +30,7 @@ entities:
           - dps_val: false
             value: true
   - entity: select
-    name: Mode
-    icon: "mdi:dishwasher"
+    translation_key: washing_mode
     category: config
     dps:
       - id: 6
@@ -39,7 +38,7 @@ entities:
         name: option
         mapping:
           - dps_val: biaozhun
-            value: normal
+            value: standard
           - dps_val: chaokuai
             value: rapid
           - dps_val: jieneng

+ 1 - 4
custom_components/tuya_local/devices/brilliant_outdoor_pirswitch.yaml

@@ -35,7 +35,7 @@ entities:
           min: 10
           max: 600
   - entity: select
-    name: Operation mode
+    translation_key: light_mode
     category: config
     dps:
       - id: 104
@@ -44,13 +44,10 @@ entities:
         mapping:
           - dps_val: "0"
             value: auto
-            icon: "mdi:motion-sensor"
           - dps_val: "1"
             value: "on"
-            icon: "mdi:motion-sensor-off"
           - dps_val: "2"
             value: flash
-            icon: "mdi:flash"
   - entity: select
     name: Sensitivity
     icon: "mdi:motion-sensor"

+ 1 - 4
custom_components/tuya_local/devices/brilliant_securitylights.yaml

@@ -51,7 +51,7 @@ entities:
           min: 10
           max: 600
   - entity: select
-    name: Operation mode
+    translation_key: light_mode
     category: config
     dps:
       - id: 104
@@ -60,13 +60,10 @@ entities:
         mapping:
           - dps_val: "0"
             value: auto
-            icon: "mdi:motion-sensor"
           - dps_val: "1"
             value: "on"
-            icon: "mdi:motion-sensor-off"
           - dps_val: "2"
             value: flash
-            icon: "mdi:flash"
   - entity: select
     name: Sensitivity
     icon: "mdi:motion-sensor"

+ 5 - 6
custom_components/tuya_local/devices/dowell_dchs-k7_32_7kw_ev_charger.yaml

@@ -415,8 +415,7 @@ entities:
         unit: s
         mask: "0000FFFF"
   - entity: select
-    translation_key: charger_mode
-    icon: "mdi:cogs"
+    translation_key: menu
     category: config
     hidden: true
     dps:
@@ -426,13 +425,13 @@ entities:
         name: option
         mapping:
           - dps_val: home
-            value: Home
+            value: home
           - dps_val: mode
-            value: Mode
+            value: mode
           - dps_val: recode
-            value: Recode
+            value: recode
           - dps_val: setting
-            value: Setting
+            value: settings
   - entity: sensor
     name: Minimum current
     class: current

+ 3 - 4
custom_components/tuya_local/devices/duoqu_selfcleaning_litterbox.yaml

@@ -11,8 +11,7 @@ entities:
         type: boolean
         name: switch
   - entity: select
-    name: Mode
-    icon: "mdi:broom"
+    translation_key: mode
     category: config
     dps:
       - id: 2
@@ -20,9 +19,9 @@ entities:
         name: option
         mapping:
           - dps_val: auto_clean
-            value: Auto
+            value: auto
           - dps_val: manual_clean
-            value: Manual
+            value: manual
   - entity: button
     name: Empty
     icon: "mdi:play"

+ 3 - 2
custom_components/tuya_local/devices/easybaby_gs801_milkmaker.yaml

@@ -5,6 +5,7 @@ products:
     model: GS-801
 entities:
   - entity: select
+    translation_key: kettle_mode
     name: Mode
     icon: "mdi:baby-bottle"
     category: config
@@ -14,9 +15,9 @@ entities:
         name: option
         mapping:
           - dps_val: true
-            value: Water
+            value: water
           - dps_val: false
-            value: Formula
+            value: infant_formula
   - entity: switch
     name: Disinfection
     icon: "mdi:kettle-steam"

+ 4 - 5
custom_components/tuya_local/devices/ecopoint_ev_charger.yaml

@@ -343,8 +343,7 @@ entities:
         unit: s
         mask: "0000FFFF"
   - entity: select
-    name: Mode
-    icon: "mdi:cogs"
+    translation_key: menu
     category: config
     dps:
       - id: 102
@@ -353,13 +352,13 @@ entities:
         name: option
         mapping:
           - dps_val: home
-            value: Home
+            value: home
           - dps_val: mode
-            value: Mode
+            value: mode
           - dps_val: recode
             value: recode
           - dps_val: setting
-            value: setting
+            value: settings
   - entity: sensor
     name: Minimum current
     class: current

+ 2 - 3
custom_components/tuya_local/devices/etna_vw644mc_dishwasher.yaml

@@ -54,8 +54,7 @@ entities:
           min: 0
           max: 1440
   - entity: select
-    name: Mode
-    icon: "mdi:dishwasher"
+    translation_key: washing_mode
     category: config
     dps:
       - id: 7
@@ -79,7 +78,7 @@ entities:
           - dps_val: hygiene
             value: hygiene
           - dps_val: universal
-            value: normal
+            value: standard
           - dps_val: soak
             value: soak
           - dps_val: self_cleaning

+ 5 - 6
custom_components/tuya_local/devices/hapaw_pet_fountain.yaml

@@ -11,8 +11,7 @@ entities:
         type: boolean
         name: switch
   - entity: select
-    name: Mode
-    icon: "mdi:paw"
+    translation_key: activation_mode
     category: config
     dps:
       - id: 2
@@ -20,13 +19,13 @@ entities:
         name: option
         mapping:
           - dps_val: normal
-            value: Normal
+            value: normal
           - dps_val: smart
-            value: Smart
+            value: smart
           - dps_val: night
-            value: Night
+            value: night
           - dps_val: pir
-            value: PIR
+            value: motion
   - entity: sensor
     name: Filter remaining
     class: duration

+ 4 - 5
custom_components/tuya_local/devices/ilife_v20_vacuum.yaml

@@ -436,8 +436,7 @@ entities:
             value: true
           - value: false
   - entity: select
-    name: Operation mode
-    icon: "mdi:robot-vacuum"
+    translation_key: cleaning_mode
     category: config
     dps:
       - id: 41
@@ -446,11 +445,11 @@ entities:
         name: option
         mapping:
           - dps_val: only_sweep
-            value: Sweep
+            value: sweep
           - dps_val: only_mop
-            value: Mop
+            value: mop
           - dps_val: both_work
-            value: Both
+            value: sweep_and_mop
   - entity: switch
     name: Auto boost
     icon: "mdi:car-turbocharger"

+ 3 - 4
custom_components/tuya_local/devices/kanchou_petfountain.yaml

@@ -4,8 +4,7 @@ products:
     manufacturer: Kanchou
 entities:
   - entity: select
-    name: Mode
-    icon: "mdi:paw"
+    translation_key: activation_mode
     category: config
     dps:
       - id: 2
@@ -13,9 +12,9 @@ entities:
         name: option
         mapping:
           - dps_val: normal
-            value: Normal
+            value: normal
           - dps_val: night
-            value: Night
+            value: night
   - entity: sensor
     name: Filter remaining
     icon: "mdi:air-filter"

+ 5 - 6
custom_components/tuya_local/devices/kesser_infrared_heater.yaml

@@ -12,18 +12,17 @@ entities:
         type: boolean
         name: switch
   - entity: select
-    name: Mode
-    icon: "mdi:radiator"
+    translation_key: mode
     dps:
       - id: 4
         type: string
         name: option
         mapping:
           - dps_val: "P0"
-            value: "Off"
+            value: "off"
           - dps_val: "P1"
-            value: "1000W"
+            value: low
           - dps_val: "P2"
-            value: "2000W"
+            value: medium
           - dps_val: "P3"
-            value: "3000W"
+            value: high

+ 5 - 6
custom_components/tuya_local/devices/kesser_infrared_heater_floodlights.yaml

@@ -11,21 +11,20 @@ entities:
         type: boolean
         name: switch
   - entity: select
-    name: Mode
-    icon: "mdi:radiator"
+    translation_key: mode
     dps:
       - id: 4
         type: string
         name: option
         mapping:
           - dps_val: "OFF"
-            value: "Off"
+            value: "off"
           - dps_val: "F1"
-            value: "1000W"
+            value: low
           - dps_val: "F2"
-            value: "2000W"
+            value: meduim
           - dps_val: "F3"
-            value: "3000W"
+            value: high
   - entity: light
     dps:
       - id: 10

+ 3 - 4
custom_components/tuya_local/devices/klarstein_amazonia_dishwasher.yaml

@@ -54,8 +54,7 @@ entities:
           min: 0
           max: 1440
   - entity: select
-    name: Mode
-    icon: "mdi:dishwasher"
+    translation_key: washing_mode
     category: config
     dps:
       - id: 7
@@ -73,9 +72,9 @@ entities:
           - dps_val: intensive
             value: intensive
           - dps_val: universal
-            value: normal
+            value: standard
           - dps_val: babycare
-            value: babycare
+            value: baby_care
   - entity: sensor
     translation_key: time_remaining
     class: duration

+ 4 - 5
custom_components/tuya_local/devices/kogan_bidet.yaml

@@ -26,8 +26,7 @@ entities:
         name: drying_time
         optional: true
   - entity: select
-    name: Mode
-    icon: "mdi:toilet"
+    translation_key: bidet_mode
     category: config
     dps:
       - id: 50
@@ -35,11 +34,11 @@ entities:
         name: option
         mapping:
           - dps_val: dry
-            value: Dry
+            value: dry
           - dps_val: normal
-            value: Normal
+            value: normal
           - dps_val: child
-            value: Child
+            value: child
   - entity: number
     name: Water temperature
     icon: "mdi:coolant-temperature"

+ 4 - 5
custom_components/tuya_local/devices/lublueblu_sl60d_vacuum.yaml

@@ -420,8 +420,7 @@ entities:
             value: true
           - value: false
   - entity: select
-    name: Operation mode
-    icon: "mdi:robot-vacuum"
+    translation_key: cleaning_mode
     category: config
     dps:
       - id: 41
@@ -430,11 +429,11 @@ entities:
         name: option
         mapping:
           - dps_val: only_sweep
-            value: Sweep
+            value: sweep
           - dps_val: only_mop
-            value: Mop
+            value: mop
           - dps_val: both_work
-            value: Both
+            value: sweep_and_mop
   - entity: select
     name: Carpet mode
     icon: "mdi:rug"

+ 3 - 4
custom_components/tuya_local/devices/m027_curtain.yaml

@@ -51,8 +51,7 @@ entities:
         name: unknown_101
         type: boolean
   - entity: select
-    name: Mode
-    icon: "mdi:theme-light-dark"
+    translation_key: curtain_mode
     category: config
     dps:
       - id: 4
@@ -60,9 +59,9 @@ entities:
         type: string
         mapping:
           - dps_val: morning
-            value: Morning
+            value: morning
           - dps_val: night
-            value: Night
+            value: night
   - entity: sensor
     translation_key: time_remaining
     class: duration

+ 5 - 6
custom_components/tuya_local/devices/madimack_inverchlor_chlorinator.yaml

@@ -361,8 +361,7 @@ entities:
         mapping:
           - scale: 10
   - entity: select
-    name: Mode
-    icon: "mdi:pool"
+    translation_key: chlorination_mode
     category: config
     dps:
       - id: 132
@@ -370,13 +369,13 @@ entities:
         name: option
         mapping:
           - dps_val: inverter
-            value: Inverter
+            value: inverter
           - dps_val: auto_ph
-            value: Auto pH
+            value: auto_ph
           - dps_val: smart
-            value: Smart
+            value: smart
           - dps_val: manual
-            value: Manual
+            value: manual
   - entity: select
     name: Salt type
     icon: "mdi:shaker-outline"

+ 3 - 4
custom_components/tuya_local/devices/minib_public_litterbox.yaml

@@ -14,17 +14,16 @@ entities:
         name: switch
 
   - entity: select
-    name: Mode
-    icon: "mdi:robot-vacuum"
+    translation_key: mode
     dps:
       - id: 2
         type: string
         name: option
         mapping:
           - dps_val: auto_clean
-            value: Auto clean
+            value: auto
           - dps_val: manual_clean
-            value: Manual clean
+            value: manual
 
   - entity: button
     name: Empty

+ 3 - 4
custom_components/tuya_local/devices/moes_single_watertimer.yaml

@@ -4,8 +4,7 @@ products:
     manufacturer: Moes
 entities:
   - entity: select
-    name: Mode
-    icon: "mdi:sprinkler"
+    translation_key: mode
     category: config
     dps:
       - id: 2
@@ -13,9 +12,9 @@ entities:
         name: option
         mapping:
           - dps_val: auto
-            value: Auto
+            value: auto
           - dps_val: manual
-            value: Manual
+            value: manual
   - entity: number
     name: Watering time
     class: duration

+ 2 - 2
custom_components/tuya_local/devices/moes_temp_humidity.yaml

@@ -51,9 +51,9 @@ entities:
         name: option
         mapping:
           - dps_val: auto
-            value: Auto
+            value: auto
           - dps_val: manual
-            value: Manual
+            value: manual
   - entity: sensor
     class: temperature
     dps:

+ 1 - 1
custom_components/tuya_local/devices/mrpure_saltchlorinator.yaml

@@ -315,7 +315,7 @@ entities:
           - scale: 10
         class: measurement
   - entity: select
-    name: Mode
+    translation_key: chlorination_mode
     category: config
     dps:
       - id: 132

+ 7 - 7
custom_components/tuya_local/devices/orion_indoor_siren.yaml

@@ -43,15 +43,15 @@ entities:
           - dps_val: false
             value: disarmed
   - entity: select
-    name: Mode
+    translation_key: alarm_mode
     dps:
       - id: 19
         type: string
         name: option
         mapping:
-          - dps_val: "SOUND"
-            value: "Sound"
-          - dps_val: "Sound_Light"
-            value: "Sound+light"
-          - dps_val: "LINGHT"
-            value: "Light"
+          - dps_val: SOUND
+            value: sound
+          - dps_val: Sound_Light
+            value: sound_and_light
+          - dps_val: LINGHT
+            value: light

+ 3 - 3
custom_components/tuya_local/devices/petoneer_fresco_ezgo_petfountain.yaml

@@ -12,7 +12,7 @@ entities:
         type: boolean
         name: switch
   - entity: select
-    name: Mode
+    translation_key: activation_mode
     category: config
     dps:
       - id: 2
@@ -20,9 +20,9 @@ entities:
         name: option
         mapping:
           - dps_val: normal
-            value: Normal
+            value: normal
           - dps_val: smart
-            value: Geyser
+            value: smart
   - entity: sensor
     name: Filter remaining
     class: duration

+ 3 - 5
custom_components/tuya_local/devices/petrust_tkwf002_petfountain.yaml

@@ -11,18 +11,16 @@ entities:
         type: boolean
         name: switch
   - entity: select
-    name: Mode
-    class: enum
-    icon: "mdi:auto-mode"
+    translation_key: activation_mode
     dps:
       - id: 2
         type: string
         name: option
         mapping:
           - dps_val: "normal"
-            value: "Normal"
+            value: "normal"
           - dps_val: "smart"
-            value: "Smart"
+            value: "smart"
   - entity: valve
     class: water
     dps:

+ 4 - 8
custom_components/tuya_local/devices/proscenic_m9_vacuum.yaml

@@ -447,22 +447,18 @@ entities:
           - dps_val: "none"
             value: false
   - entity: select
-    name: Working mode
-    icon: "mdi:vacuum"
+    translation_key: cleaning_mode
     dps:
       - id: 41
         name: option
         type: string
         mapping:
           - dps_val: both_work
-            value: Vacuum and mop
-            icon: "mdi:robot-vacuum-variant"
+            value: sweep_and_mop
           - dps_val: only_sweep
-            value: Vacuum only
-            icon: "mdi:broom"
+            value: sweep
           - dps_val: only_mop
-            value: Mopping only
-            icon: "mdi:liquid-spot"
+            value: mop
   - entity: switch
     name: LED lights
     category: config

+ 4 - 7
custom_components/tuya_local/devices/qlima_d820a_dehumidifier.yaml

@@ -100,21 +100,18 @@ entities:
           - dps_val: "3"
             value: "All on"
   - entity: select
-    name: Operating mode
+    translation_key: air_mode
     dps:
       - id: 105
         type: string
         name: option
         mapping:
           - dps_val: dehum_air
-            value: Dehumidify only
-            icon: "mdi:water-percent"
+            value: dehumidify
           - dps_val: airpurify
-            value: Purify only
-            icon: "mdi:air-filter"
+            value: purify
           - dps_val: dehum30_air
-            value: Both
-            icon: "mdi:air-humidifier"
+            value: dehumidify_and_purify
   - entity: switch
     name: Internal dry
     category: config

+ 3 - 5
custom_components/tuya_local/devices/quad_temphumidity_switch.yaml

@@ -26,8 +26,7 @@ entities:
         type: boolean
         name: switch
   - entity: select
-    name: Operating mode
-    icon: "mdi:thermometer-auto"
+    translation_key: mode
     category: config
     dps:
       - id: 4
@@ -35,10 +34,9 @@ entities:
         name: option
         mapping:
           - dps_val: auto
-            value: Auto
+            value: auto
           - dps_val: manual
-            value: Manual
-            icon: "mdi:thermometer-off"
+            value: manual
   - entity: climate
     translation_key: thermostat
     dps:

+ 6 - 7
custom_components/tuya_local/devices/sevr_x1_evcharger.yaml

@@ -167,8 +167,7 @@ entities:
           - dps_val: controlpi_error
             value: Error
   - entity: select
-    name: Mode
-    icon: "mdi:ev-station"
+    translation_key: charging_mode
     category: config
     dps:
       - id: 14
@@ -176,15 +175,15 @@ entities:
         name: option
         mapping:
           - dps_val: charge_now
-            value: Immediate
+            value: immediate
           - dps_val: charge_pct
-            value: Charge to percent
+            value: charge_to_percent
           - dps_val: charge_energy
-            value: Fixed charge
+            value: fixed_charge
           - dps_val: charge_schedule
-            value: Scheduled charge
+            value: scheduled_charge
           - dps_val: charge_delay
-            value: Delayed charge
+            value: delayed_charge
   - entity: sensor
     name: Energy remaining
     class: energy_storage

+ 3 - 4
custom_components/tuya_local/devices/smart_watering_device.yaml

@@ -15,17 +15,16 @@ entities:
         optional: true
         name: schedule
   - entity: select
-    name: Mode
-    icon: "mdi:auto-mode"
+    translation_key: mode
     dps:
       - id: 2
         type: string
         name: option
         mapping:
           - dps_val: auto
-            value: Auto
+            value: auto
           - dps_val: manual
-            value: Manual
+            value: manual
   - entity: number
     class: duration
     translation_key: timer

+ 6 - 7
custom_components/tuya_local/devices/tera_w01_evcharger.yaml

@@ -221,9 +221,8 @@ entities:
           - dps_val: controlpi_error
             value: Error
   - entity: select
-    name: Mode
+    translation_key: charging_mode
     category: config
-    icon: "mdi:ev-station"
     dps:
       - id: 14  # work_mode
         type: string
@@ -231,15 +230,15 @@ entities:
         name: option
         mapping:
           - dps_val: charge_now
-            value: Immediate
+            value: immediate
           - dps_val: charge_energy
-            value: Fixed charge
+            value: fixed_charge
           - dps_val: charge_schedule
-            value: Scheduled charge
+            value: scheduled_charge
           - dps_val: charge_delay
-            value: Delayed charge
+            value: delayed_charge
           - dps_val: charge_pct
-            value: Percentage charge
+            value: charge_to_percent
   - entity: switch
     icon: "mdi:ev-station"
     dps:

+ 6 - 7
custom_components/tuya_local/devices/vevor_3_7kw_evcharger.yaml

@@ -161,8 +161,7 @@ entities:
           - dps_val: controlpi_error
             value: Error
   - entity: select
-    name: Mode
-    icon: "mdi:ev-station"
+    translation_key: charging_mode
     category: config
     dps:
       - id: 14
@@ -171,15 +170,15 @@ entities:
         name: option
         mapping:
           - dps_val: charge_now
-            value: Immediate
+            value: immediate
           - dps_val: charge_pct
-            value: Charge to percent
+            value: charge_to_percent
           - dps_val: charge_energy
-            value: Fixed charge
+            value: fixed_charge
           - dps_val: charge_schedule
-            value: Scheduled charge
+            value: scheduled_charge
           - dps_val: charge_delay
-            value: Delayed charge
+            value: delayed_charge
   - entity: button
     name: Clear energy
     class: restart

+ 6 - 7
custom_components/tuya_local/devices/vevor_ev_charger.yaml

@@ -164,8 +164,7 @@ entities:
           - dps_val: controlpi_error
             value: Error
   - entity: select
-    name: Mode
-    icon: "mdi:ev-station"
+    translation_key: charging_mode
     category: config
     dps:
       - id: 14
@@ -174,15 +173,15 @@ entities:
         name: option
         mapping:
           - dps_val: charge_now
-            value: Immediate
+            value: immediate
           - dps_val: charge_pct
-            value: Charge to percent
+            value: charge_to_percent
           - dps_val: charge_energy
-            value: Fixed charge
+            value: fixed_charge
           - dps_val: charge_schedule
-            value: Scheduled charge
+            value: scheduled_charge
           - dps_val: charge_delay
-            value: Delayed charge
+            value: delayed_charge
   - entity: button
     name: Clear energy
     class: restart

+ 6 - 7
custom_components/tuya_local/devices/vevor_l2_ev_charger.yaml

@@ -138,8 +138,7 @@ entities:
           - dps_val: controlpi_error
             value: Error
   - entity: select
-    name: Mode
-    icon: "mdi:ev-station"
+    translation_key: charging_mode
     category: config
     dps:
       - id: 14
@@ -147,15 +146,15 @@ entities:
         name: option
         mapping:
           - dps_val: charge_now
-            value: Immediate
+            value: immediate
           - dps_val: charge_pct
-            value: Charge to percent
+            value: charge_to_percent
           - dps_val: charge_energy
-            value: Fixed charge
+            value: fixed_charge
           - dps_val: charge_schedule
-            value: Scheduled charge
+            value: scheduled_charge
           - dps_val: charge_delay
-            value: Delayed charge
+            value: delayed_charge
   - entity: button
     name: Clear energy
     class: restart

+ 6 - 7
custom_components/tuya_local/devices/wadapower_q8_evcharger.yaml

@@ -71,8 +71,7 @@ entities:
         type: bitfield
         name: fault_code
   - entity: select
-    name: Mode
-    icon: "mdi:ev-station"
+    translation_key: charging_mode
     category: config
     dps:
       - id: 14
@@ -80,15 +79,15 @@ entities:
         name: option
         mapping:
           - dps_val: charge_now
-            value: Immediate
+            value: immediate
           - dps_val: charge_pct
-            value: Charge to percent
+            value: charge_to_percent
           - dps_val: charge_energy
-            value: Fixed charge
+            value: fixed_charge
           - dps_val: charge_schedule
-            value: Scheduled charge
+            value: scheduled_charge
           - dps_val: charge_delay
-            value: Delayed charge
+            value: delayed_charge
   - entity: switch
     icon: "mdi:power"
     dps:

+ 5 - 6
custom_components/tuya_local/devices/wouej_evcharger.yaml

@@ -72,8 +72,7 @@ entities:
         type: bitfield
         name: fault_code
   - entity: select
-    name: Mode
-    icon: "mdi:evstation"
+    translation_key: charging_mode
     category: config
     dps:
       - id: 14
@@ -81,13 +80,13 @@ entities:
         name: option
         mapping:
           - dps_val: charge_now
-            value: Immediate
+            value: immediate
           - dps_val: charge_pct
-            value: Charge to percent
+            value: charge_to_percent
           - dps_val: charge_energy
-            value: Fixed charge
+            value: fixed_charge
           - dps_val: charage_schedule
-            value: Scheduled charge
+            value: scheduled_charge
   - entity: switch
     name: Power
     icon: "mdi:ev-station"

+ 3 - 3
custom_components/tuya_local/devices/zemismart_roller_shade_zm25r2.yaml

@@ -61,7 +61,7 @@ entities:
               - dps_val: 100
                 value: closed
   - entity: select
-    name: Mode
+    translation_key: curtain_mode
     icon: "mdi:theme-light-dark"
     category: config
     dps:
@@ -71,9 +71,9 @@ entities:
         optional: true
         mapping:
           - dps_val: morning
-            value: Morning
+            value: morning
           - dps_val: night
-            value: Night
+            value: night
   - entity: binary_sensor
     class: problem
     category: diagnostic

+ 1 - 2
custom_components/tuya_local/devices/zemismart_zm85el1x_rollershade.yaml

@@ -50,8 +50,7 @@ entities:
           - dps_val: fully_close
             value: closed
   - entity: select
-    name: Mode
-    icon: "mdi:theme-light-dark"
+    translation_key: curtain_mode
     category: config
     dps:
       - id: 4

+ 1 - 2
custom_components/tuya_local/devices/zmp71sh_pool_pump.yaml

@@ -75,8 +75,7 @@ entities:
         optional: true
         name: value
   - entity: select
-    name: Mode
-    icon: "mdi:water-pump"
+    translation_key: mode
     category: config
     dps:
       - id: 101

+ 4 - 4
tests/devices/test_m027_curtain.py

@@ -48,16 +48,16 @@ class TestM027Curtains(MultiSensorTests, BasicSelectTests, TuyaDeviceTestCase):
         )
         self.setUpBasicSelect(
             MODE_DPS,
-            self.entities.get("select_mode"),
+            self.entities.get("select_curtain_mode"),
             {
-                "morning": "Morning",
-                "night": "Night",
+                "morning": "morning",
+                "night": "night",
             },
         )
         self.mark_secondary(
             [
                 "binary_sensor_problem",
-                "select_mode",
+                "select_curtain_mode",
                 "sensor_time_remaining",
                 "sensor_travel_time",
             ]