Przeglądaj źródła

Initial state select: standardise icons and translations.

- migration added for naming variations

Issue #1708
Jason Rumney 1 rok temu
rodzic
commit
0633f52128
79 zmienionych plików z 392 dodań i 275 usunięć
  1. 4 0
      custom_components/tuya_local/__init__.py
  2. 5 6
      custom_components/tuya_local/devices/ard100_valve.yaml
  3. 4 4
      custom_components/tuya_local/devices/arlec_pb88uha_s2_switch.yaml
  4. 3 4
      custom_components/tuya_local/devices/atorch_at2pl_breaker.yaml
  5. 4 4
      custom_components/tuya_local/devices/atorch_at4pw_energymeter.yaml
  6. 4 4
      custom_components/tuya_local/devices/atorch_s1wp.yaml
  7. 4 5
      custom_components/tuya_local/devices/aubess_1gang_switch.yaml
  8. 4 5
      custom_components/tuya_local/devices/aubess_2gang_switch.yaml
  9. 2 3
      custom_components/tuya_local/devices/bauhn_ap5w0624_powerstrip.yaml
  10. 4 5
      custom_components/tuya_local/devices/blitzwolf_bwshp6_smartplug.yaml
  11. 5 6
      custom_components/tuya_local/devices/cbi_astute_outdoor_smartswitch.yaml
  12. 4 5
      custom_components/tuya_local/devices/dimming_1ch_switch.yaml
  13. 5 6
      custom_components/tuya_local/devices/dual_power_monitor_smartplugv2.yaml
  14. 4 4
      custom_components/tuya_local/devices/ge_jasco_ultra_pro_toggle_dimmer_v2.yaml
  15. 4 4
      custom_components/tuya_local/devices/ge_jasco_ultra_pro_toggle_switch.yaml
  16. 4 5
      custom_components/tuya_local/devices/gosund_sp112_usbsmartplug.yaml
  17. 4 5
      custom_components/tuya_local/devices/grid_connect_usb_double_power_point.yaml
  18. 4 5
      custom_components/tuya_local/devices/grid_connect_usb_power_point.yaml
  19. 4 5
      custom_components/tuya_local/devices/hysen_hy02tp_thermostat.yaml
  20. 4 4
      custom_components/tuya_local/devices/hysen_hy08we2_thermostat.yaml
  21. 1 2
      custom_components/tuya_local/devices/jh_pcpro+.yaml
  22. 4 4
      custom_components/tuya_local/devices/ledlux_thermostat.yaml
  23. 4 5
      custom_components/tuya_local/devices/loratap_relay.yaml
  24. 4 5
      custom_components/tuya_local/devices/malmbergs_dual_dimmer.yaml
  25. 4 4
      custom_components/tuya_local/devices/mirabella_power_strip.yaml
  26. 4 5
      custom_components/tuya_local/devices/moes_dual_dimmer.yaml
  27. 4 4
      custom_components/tuya_local/devices/moes_motionsensor_switch.yaml
  28. 4 5
      custom_components/tuya_local/devices/moes_quad_switch.yaml
  29. 4 4
      custom_components/tuya_local/devices/moes_temp_humidity.yaml
  30. 4 5
      custom_components/tuya_local/devices/moes_threegang.yaml
  31. 5 6
      custom_components/tuya_local/devices/moesgo_dimmer.yaml
  32. 5 6
      custom_components/tuya_local/devices/nooie_nsp21_smartplug.yaml
  33. 4 5
      custom_components/tuya_local/devices/nooie_pu13_smartplug.yaml
  34. 4 5
      custom_components/tuya_local/devices/novadigital_quad_switch.yaml
  35. 7 8
      custom_components/tuya_local/devices/powerstrip_4outlet_usbs.yaml
  36. 4 5
      custom_components/tuya_local/devices/quad_powerstrip_usb.yaml
  37. 5 6
      custom_components/tuya_local/devices/relay_switch_remote.yaml
  38. 4 5
      custom_components/tuya_local/devices/seven_channel_switch.yaml
  39. 4 5
      custom_components/tuya_local/devices/simple_switch_timerv2.yaml
  40. 4 5
      custom_components/tuya_local/devices/single_switch_with_backlight.yaml
  41. 4 5
      custom_components/tuya_local/devices/smart_powerstrip_3_outlet_energy.yaml
  42. 4 5
      custom_components/tuya_local/devices/smartplug_usb.yaml
  43. 4 5
      custom_components/tuya_local/devices/smartplug_with_childlock.yaml
  44. 4 5
      custom_components/tuya_local/devices/smartplugv2_childlock.yaml
  45. 4 5
      custom_components/tuya_local/devices/smartplugv2_energy.yaml
  46. 4 5
      custom_components/tuya_local/devices/smartplugv2_energyv2.yaml
  47. 4 5
      custom_components/tuya_local/devices/smartplugv2_energyv3.yaml
  48. 4 5
      custom_components/tuya_local/devices/smartplugv3.yaml
  49. 10 11
      custom_components/tuya_local/devices/somgom_single_switch.yaml
  50. 4 5
      custom_components/tuya_local/devices/tongou_toqsyswt_breaker.yaml
  51. 4 5
      custom_components/tuya_local/devices/wdyk_3phase_energymonitor.yaml
  52. 5 6
      custom_components/tuya_local/devices/wf39m_dimmer_smartplug.yaml
  53. 5 6
      custom_components/tuya_local/devices/yidi_fan_light_switch.yaml
  54. 3 0
      custom_components/tuya_local/icons.json
  55. 8 0
      custom_components/tuya_local/translations/bg.json
  56. 8 0
      custom_components/tuya_local/translations/cz.json
  57. 8 0
      custom_components/tuya_local/translations/de.json
  58. 8 0
      custom_components/tuya_local/translations/el.json
  59. 8 0
      custom_components/tuya_local/translations/en.json
  60. 8 0
      custom_components/tuya_local/translations/es.json
  61. 8 0
      custom_components/tuya_local/translations/fr.json
  62. 8 0
      custom_components/tuya_local/translations/hu.json
  63. 8 0
      custom_components/tuya_local/translations/id.json
  64. 8 0
      custom_components/tuya_local/translations/it.json
  65. 8 0
      custom_components/tuya_local/translations/ja.json
  66. 8 0
      custom_components/tuya_local/translations/no-NB.json
  67. 8 0
      custom_components/tuya_local/translations/pl.json
  68. 8 0
      custom_components/tuya_local/translations/pt-BR.json
  69. 8 0
      custom_components/tuya_local/translations/ru.json
  70. 8 0
      custom_components/tuya_local/translations/uk.json
  71. 8 0
      custom_components/tuya_local/translations/ur.json
  72. 8 0
      custom_components/tuya_local/translations/zh-Hans.json
  73. 8 0
      custom_components/tuya_local/translations/zh-Hant.json
  74. 1 1
      pyproject.toml
  75. 1 1
      requirements-dev.txt
  76. 3 3
      tests/devices/test_grid_connect_double_power_point.py
  77. 5 5
      tests/devices/test_moes_temp_humidity.py
  78. 1 1
      tests/devices/test_simple_switch_with_timerv2.py
  79. 3 3
      tests/devices/test_smartplugv2_energy.py

+ 4 - 0
custom_components/tuya_local/__init__.py

@@ -598,6 +598,10 @@ async def async_migrate_entry(hass, entry: ConfigEntry):
                 "switch_sleep_mode": "switch_sleep",
                 "switch_sleep_timer": "switch_sleep",
                 "select_voice_language": "select_language",
+                "select_restore_power_state": "select_initial_state",
+                "select_power_on_state": "select_initial_state",
+                "select_restart_status": "select_initial_state",
+                "select_poweron_status": "select_initial_state",
             }
             for suffix, new_suffix in replacements.items():
                 if old_id.endswith(suffix):

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

@@ -32,17 +32,16 @@ secondary_entities:
           - scale: 1
           - dps_val: null
   - entity: select
-    name: Initial state
+    translation_key: initial_state
     category: config
-    icon: "mdi:toggle-switch"
     dps:
       - id: 14
         type: string
         name: option
         mapping:
           - dps_val: "off"
-            value: "Off"
+            value: "off"
           - dps_val: "on"
-            value: "On"
-          - dps_val: "memory"
-            value: "Last state"
+            value: "on"
+          - dps_val: memory
+            value: memory

+ 4 - 4
custom_components/tuya_local/devices/arlec_pb88uha_s2_switch.yaml

@@ -94,18 +94,18 @@ secondary_entities:
             step: 60
   - entity: select
     category: config
-    name: Restore power state
+    translation_key: initial_state
     dps:
       - id: 38
         name: option
         type: string
         mapping:
           - dps_val: memory
-            value: Remember Last Status
+            value: memory
           - dps_val: "on"
-            value: "On"
+            value: "on"
           - dps_val: "off"
-            value: "Off"
+            value: "off"
   - entity: lock
     category: config
     translation_key: child_lock

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

@@ -427,8 +427,7 @@ secondary_entities:
           min: 0
           max: 99
   - entity: select
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     category: config
     dps:
       - id: 138
@@ -436,9 +435,9 @@ secondary_entities:
         name: option
         mapping:
           - dps_val: open
-            value: "Off"
+            value: "off"
           - dps_val: close
-            value: "On"
+            value: "on"
   - entity: switch
     name: Prepaid
     icon: "mdi:hand-coin"

+ 4 - 4
custom_components/tuya_local/devices/atorch_at4pw_energymeter.yaml

@@ -317,18 +317,18 @@ secondary_entities:
           max: 99
   - entity: select
     category: config
-    name: Initial state
+    translation_key: initial_state
     dps:
       - id: 138
         type: string
         name: option
         mapping:
           - dps_val: open
-            value: "On"
+            value: "on"
           - dps_val: colse
-            value: "Off"
+            value: "off"
           - dps_val: memory
-            value: Last state
+            value: memory
   - entity: switch
     name: Prepay
     category: config

+ 4 - 4
custom_components/tuya_local/devices/atorch_s1wp.yaml

@@ -512,18 +512,18 @@ secondary_entities:
           max: 99
   - entity: select
     category: config
-    name: Poweron status
+    translation_key: initial_state
     dps:
       - id: 138
         type: string
         name: option
         mapping:
           - dps_val: open
-            value: "On"
+            value: "on"
           - dps_val: colse
-            value: "Off"
+            value: "off"
           - dps_val: memory
-            value: Memory
+            value: memory
   - entity: number
     category: config
     name: Update interval

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

@@ -32,20 +32,19 @@ secondary_entities:
           - scale: 60
             step: 60
   - entity: select
-    name: Restore power state
+    translation_key: initial_state
     category: config
-    icon: "mdi:toggle-switch"
     dps:
       - id: 38
         type: string
         name: option
         mapping:
           - dps_val: "0"
-            value: "Off"
+            value: "off"
           - dps_val: "1"
-            value: "On"
+            value: "on"
           - dps_val: "2"
-            value: Remember last state
+            value: memory
   - entity: sensor
     name: Energy
     category: diagnostic

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

@@ -58,20 +58,19 @@ secondary_entities:
           - scale: 60
             step: 60
   - entity: select
-    name: Restore power state
+    translation_key: initial_state
     category: config
-    icon: "mdi:toggle-switch"
     dps:
       - id: 38
         type: string
         name: option
         mapping:
           - dps_val: memory
-            value: Remember last state
+            value: memory
           - dps_val: "on"
-            value: "On"
+            value: "on"
           - dps_val: "off"
-            value: "Off"
+            value: "off"
   - entity: select
     name: Switch type
     icon: "mdi:toggle-switch"

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

@@ -175,8 +175,7 @@ secondary_entities:
         name: calibration
         optional: true
   - entity: select
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     category: config
     dps:
       - id: 38
@@ -188,7 +187,7 @@ secondary_entities:
           - dps_val: "off"
             value: "off"
           - dps_val: "memory"
-            value: Last state
+            value: memory
   - entity: lock
     translation_key: child_lock
     category: config

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

@@ -93,8 +93,7 @@ secondary_entities:
           - scale: 60
             step: 60
   - entity: select
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     category: config
     dps:
       - id: 38
@@ -102,11 +101,11 @@ secondary_entities:
         name: option
         mapping:
           - dps_val: "on"
-            value: "On"
+            value: "on"
           - dps_val: "off"
-            value: "Off"
+            value: "off"
           - dps_val: memory
-            value: Last state
+            value: memory
   - entity: select
     name: Light mode
     icon: "mdi:lightbulb"

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

@@ -26,19 +26,18 @@ secondary_entities:
             step: 60
   - entity: select
     category: config
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     dps:
       - id: 14
         type: string
         name: option
         mapping:
           - dps_val: "on"
-            value: "On"
+            value: "on"
           - dps_val: "off"
-            value: "Off"
-          - dps_val: "memory"
-            value: "Last State"
+            value: "off"
+          - dps_val: memory
+            value: memory
   - entity: sensor
     category: diagnostic
     class: energy

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

@@ -52,8 +52,7 @@ secondary_entities:
           - scale: 60
             step: 60
   - entity: select
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     category: config
     dps:
       - id: 14
@@ -61,8 +60,8 @@ secondary_entities:
         name: option
         mapping:
           - dps_val: "on"
-            value: "On"
+            value: "on"
           - dps_val: "off"
-            value: "Off"
+            value: "off"
           - dps_val: memory
-            value: Last state
+            value: memory

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

@@ -129,8 +129,7 @@ secondary_entities:
             value: false
           - value: true
   - entity: select
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     category: config
     dps:
       - id: 38
@@ -139,11 +138,11 @@ secondary_entities:
         optional: true
         mapping:
           - dps_val: "on"
-            value: "On"
+            value: "on"
           - dps_val: "off"
-            value: "Off"
-          - dps_val: "memory"
-            value: "Last state"
+            value: "off"
+          - dps_val: memory
+            value: memory
           - dps_val: null
             invalid: true
   - entity: lock

+ 4 - 4
custom_components/tuya_local/devices/ge_jasco_ultra_pro_toggle_dimmer_v2.yaml

@@ -48,18 +48,18 @@ secondary_entities:
             step: 60
   - entity: select
     category: config
-    name: Restore power state
+    translation_key: initial_state
     dps:
       - id: 14
         name: option
         type: string
         mapping:
           - dps_val: memory
-            value: Remember Last Status
+            value: memory
           - dps_val: "on"
-            value: "On"
+            value: "on"
           - dps_val: "off"
-            value: "Off"
+            value: "off"
   - entity: select
     name: Indicator Light
     category: config

+ 4 - 4
custom_components/tuya_local/devices/ge_jasco_ultra_pro_toggle_switch.yaml

@@ -15,18 +15,18 @@ primary_entity:
 secondary_entities:
   - entity: select
     category: config
-    name: Restore power state
+    translation_key: initial_state
     dps:
       - id: 14
         name: option
         type: string
         mapping:
           - dps_val: memory
-            value: Remember Last Status
+            value: memory
           - dps_val: "on"
-            value: "On"
+            value: "on"
           - dps_val: "off"
-            value: "Off"
+            value: "off"
   - entity: select
     name: Indicator Light
     category: config

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

@@ -121,8 +121,7 @@ secondary_entities:
           - scale: 60
             step: 60
   - entity: select
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     category: config
     dps:
       - id: 38
@@ -130,11 +129,11 @@ secondary_entities:
         name: option
         mapping:
           - dps_val: "1"
-            value: "On"
+            value: "on"
           - dps_val: "0"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: Last state
+            value: memory
   - entity: select
     name: Light mode
     icon: "mdi:lightbulb"

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

@@ -89,19 +89,18 @@ secondary_entities:
         type: integer
   - entity: select
     category: config
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     dps:
       - id: 38
         name: option
         type: string
         mapping:
           - dps_val: "on"
-            value: "On"
+            value: "on"
           - dps_val: "off"
-            value: "Off"
+            value: "off"
           - dps_val: memory
-            value: Last State
+            value: memory
   - entity: number
     name: Timer 1
     translation_key: timer

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

@@ -44,20 +44,19 @@ secondary_entities:
             step: 60
         unit: min
   - entity: select
-    name: Initial state
+    translation_key: initial_state
     category: config
-    icon: "mdi:toggle-switch"
     dps:
       - id: 38
         type: string
         name: option
         mapping:
           - dps_val: power_off
-            value: "Off"
+            value: "off"
           - dps_val: power_on
-            value: "On"
+            value: "on"
           - dps_val: last
-            value: Keep state
+            value: memory
   - entity: lock
     translation_key: child_lock
     category: config

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

@@ -214,8 +214,7 @@ secondary_entities:
           min: 1
           max: 10
   - entity: select
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     category: config
     dps:
       - id: 117
@@ -223,11 +222,11 @@ secondary_entities:
         name: option
         mapping:
           - dps_val: keep
-            value: Last state
+            value: memory
           - dps_val: "off"
-            value: "Off"
+            value: "off"
           - dps_val: "on"
-            value: "On"
+            value: "on"
   - entity: select
     name: Schedule
     icon: "mdi:calendar-weekend"

+ 4 - 4
custom_components/tuya_local/devices/hysen_hy08we2_thermostat.yaml

@@ -327,7 +327,7 @@ secondary_entities:
           - dps_val: all
             value: Both
   - entity: select
-    name: Initial state
+    translation_key: initial_state
     category: config
     dps:
       - id: 117
@@ -335,11 +335,11 @@ secondary_entities:
         name: option
         mapping:
           - dps_val: keep
-            value: Previous
+            value: memory
           - dps_val: "off"
-            value: "Off"
+            value: "off"
           - dps_val: "on"
-            value: "On"
+            value: "on"
   - entity: select
     name: Schedule
     category: config

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

@@ -46,8 +46,7 @@ secondary_entities:
         type: boolean
         name: switch
   - entity: select
-    name: Initial state
-    icon: mdi:power-settings
+    translation_key: initial_state
     category: config
     dps:
       - id: 38

+ 4 - 4
custom_components/tuya_local/devices/ledlux_thermostat.yaml

@@ -170,7 +170,7 @@ secondary_entities:
           max: 10
         unit: C
   - entity: select
-    name: Initial state
+    translation_key: initial_state
     category: config
     dps:
       - id: 117
@@ -178,11 +178,11 @@ secondary_entities:
         name: option
         mapping:
           - dps_val: keep
-            value: Previous
+            value: memory
           - dps_val: "off"
-            value: "Off"
+            value: "off"
           - dps_val: "on"
-            value: "On"
+            value: "on"
   - entity: select
     name: Schedule
     category: config

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

@@ -33,20 +33,19 @@ secondary_entities:
           max: 86400
         unit: s
   - entity: select
-    name: Restart Status
+    translation_key: initial_state
     category: config
-    icon: "mdi:toggle-switch"
     dps:
       - id: 39
         type: string
         name: option
         mapping:
           - dps_val: 0
-            value: "Off"
+            value: "off"
           - dps_val: 1
-            value: "On"
+            value: "on"
           - dps_val: 2
-            value: Keep state
+            value: memory
       - id: 42
         type: string
         name: cycle_time

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

@@ -80,8 +80,7 @@ secondary_entities:
           - scale: 60
             step: 60
   - entity: select
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     category: config
     dps:
       - id: 14
@@ -89,8 +88,8 @@ secondary_entities:
         name: option
         mapping:
           - dps_val: "off"
-            value: "Off"
+            value: "off"
           - dps_val: "on"
-            value: "On"
+            value: "on"
           - dps_val: memory
-            value: Last state
+            value: memory

+ 4 - 4
custom_components/tuya_local/devices/mirabella_power_strip.yaml

@@ -116,18 +116,18 @@ secondary_entities:
             step: 60
   - entity: select
     category: config
-    name: Restore power state
+    translation_key: initial_state
     dps:
       - id: 38
         name: option
         type: string
         mapping:
           - dps_val: memory
-            value: Remember Last Status
+            value: memory
           - dps_val: "on"
-            value: "On"
+            value: "on"
           - dps_val: "off"
-            value: "Off"
+            value: "off"
   - entity: lock
     category: config
     translation_key: child_lock

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

@@ -143,8 +143,7 @@ secondary_entities:
           - scale: 60
             step: 60
   - entity: select
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     category: config
     dps:
       - id: 14
@@ -153,8 +152,8 @@ secondary_entities:
         optional: true
         mapping:
           - dps_val: "off"
-            value: "Off"
+            value: "off"
           - dps_val: "on"
-            value: "On"
+            value: "on"
           - dps_val: memory
-            value: Last state
+            value: memory

+ 4 - 4
custom_components/tuya_local/devices/moes_motionsensor_switch.yaml

@@ -37,18 +37,18 @@ primary_entity:
 secondary_entities:
   - entity: select
     category: config
-    name: Initial state
+    translation_key: initial_state
     dps:
       - id: 14
         name: option
         type: string
         mapping:
           - dps_val: memory
-            value: Last state
+            value: memory
           - dps_val: "on"
-            value: "On"
+            value: "on"
           - dps_val: "off"
-            value: "Off"
+            value: "off"
   - entity: select
     name: Indicator light
     category: config

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

@@ -102,8 +102,7 @@ secondary_entities:
           - scale: 60
             step: 60
   - entity: select
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     category: config
     dps:
       - id: 38
@@ -111,11 +110,11 @@ secondary_entities:
         name: option
         mapping:
           - dps_val: "off"
-            value: "Off"
+            value: "off"
           - dps_val: "on"
-            value: "On"
+            value: "on"
           - dps_val: memory
-            value: Last state
+            value: memory
   - entity: select
     name: Switch type
     icon: "mdi:toggle-switch"

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

@@ -148,7 +148,7 @@ secondary_entities:
           min: 0
           max: 86400
   - entity: select
-    name: Power on state
+    translation_key: initial_state
     category: config
     dps:
       - id: 105
@@ -156,11 +156,11 @@ secondary_entities:
         name: option
         mapping:
           - dps_val: "on"
-            value: "On"
+            value: "on"
           - dps_val: "off"
-            value: "Off"
+            value: "off"
           - dps_val: memory
-            value: Last State
+            value: memory
   - entity: number
     name: High temperature switch level
     category: config

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

@@ -76,8 +76,7 @@ secondary_entities:
             step: 60
   - entity: select
     category: config
-    name: "Initial state"
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     dps:
       - id: 14
         type: string
@@ -85,8 +84,8 @@ secondary_entities:
         optional: true
         mapping:
           - dps_val: 0
-            value: "On"
+            value: "on"
           - dps_val: 1
-            value: "Off"
+            value: "off"
           - dps_val: 2
-            value: "Last State"
+            value: memory

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

@@ -59,8 +59,7 @@ secondary_entities:
           - scale: 60
             step: 60
   - entity: select
-    name: Power on state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     category: config
     dps:
       - id: 14
@@ -69,11 +68,11 @@ secondary_entities:
         optional: true
         mapping:
           - dps_val: "off"
-            value: "Off"
+            value: "off"
           - dps_val: "on"
-            value: "On"
-          - dps_val: "memory"
-            value: "Last state"
+            value: "on"
+          - dps_val: memory
+            value: memory
   - entity: light
     translation_key: backlight
     category: config

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

@@ -47,8 +47,7 @@ secondary_entities:
         type: boolean
         name: lock
   - entity: select
-    name: "Power on state"
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     category: config
     dps:
       - id: 38
@@ -56,8 +55,8 @@ secondary_entities:
         name: option
         mapping:
           - dps_val: "on"
-            value: "On"
+            value: "on"
           - dps_val: "off"
-            value: "Off"
-          - dps_val: "memory"
-            value: "Last state"
+            value: "off"
+          - dps_val: memory
+            value: memory

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

@@ -32,8 +32,7 @@ secondary_entities:
         type: boolean
         name: lock
   - entity: select
-    name: "Power on state"
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     category: config
     dps:
       - id: 39
@@ -41,8 +40,8 @@ secondary_entities:
         name: option
         mapping:
           - dps_val: 1
-            value: "On"
+            value: "on"
           - dps_val: 0
-            value: "Off"
+            value: "off"
           - dps_val: 2
-            value: "Last state"
+            value: memory

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

@@ -93,19 +93,18 @@ secondary_entities:
             step: 60
   - entity: select
     category: config
-    name: Restore power state
-    icon: "mdi:power-settings"
+    translation_key: initial_state
     dps:
       - id: 14
         name: option
         type: string
         mapping:
           - dps_val: 0
-            value: "Off"
+            value: "off"
           - dps_val: 1
-            value: "On"
+            value: "on"
           - dps_val: 2
-            value: Remember Last Status
+            value: memory
         optional: true
         force: true
   - entity: light

+ 7 - 8
custom_components/tuya_local/devices/powerstrip_4outlet_usbs.yaml

@@ -37,17 +37,16 @@ secondary_entities:
         type: boolean
         name: switch
   - entity: select
-    name: Restore power state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     category: config
     dps:
       - id: 7
         type: string
         name: option
         mapping:
-          - dps_val: 0
-            value: "OFF"
-          - dps_val: 1
-            value: "ON"
-          - dps_val: 2
-            value: Remember last state
+          - dps_val: "0"
+            value: "off"
+          - dps_val: "1"
+            value: "on"
+          - dps_val: "2"
+            value: memory

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

@@ -169,8 +169,7 @@ secondary_entities:
         name: calibration
         optional: true
   - entity: select
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     category: config
     dps:
       - id: 38
@@ -179,11 +178,11 @@ secondary_entities:
         optional: true
         mapping:
           - dps_val: "on"
-            value: "On"
+            value: "on"
           - dps_val: "off"
-            value: "Off"
+            value: "off"
           - dps_val: memory
-            value: Last state
+            value: memory
   - entity: select
     name: Backlight
     icon: "mdi:circle-double"

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

@@ -40,8 +40,7 @@ secondary_entities:
           - scale: 60
             step: 60
   - entity: select
-    name: Power on state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     category: config
     dps:
       - id: 38
@@ -49,11 +48,11 @@ secondary_entities:
         name: option
         mapping:
           - dps_val: "off"
-            value: "Off"
+            value: "off"
           - dps_val: "on"
-            value: "On"
-          - dps_val: "memory"
-            value: Last state
+            value: "on"
+          - dps_val: memory
+            value: memory
   - entity: select
     name: Switch type
     icon: "mdi:toggle-switch"

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

@@ -152,8 +152,7 @@ secondary_entities:
           - scale: 60
             step: 60
   - entity: select
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     category: config
     dps:
       - id: 38
@@ -161,8 +160,8 @@ secondary_entities:
         name: option
         mapping:
           - dps_val: "off"
-            value: "Off"
+            value: "off"
           - dps_val: "on"
-            value: "On"
+            value: "on"
           - dps_val: memory
-            value: Last state
+            value: memory

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

@@ -30,8 +30,7 @@ secondary_entities:
           - scale: 60
             step: 60
   - entity: select
-    name: Power on state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     category: config
     dps:
       - id: 38
@@ -40,10 +39,10 @@ secondary_entities:
         optional: true
         mapping:
           - dps_val: "on"
-            value: "On"
+            value: "on"
           - dps_val: "off"
-            value: "Off"
+            value: "off"
           - dps_val: memory
-            value: Last state
+            value: memory
           - dps_val: null
             invalid: true

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

@@ -24,19 +24,18 @@ secondary_entities:
         unit: min
   - entity: select
     category: config
-    name: "Restore Power State"
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     dps:
       - id: 14
         name: option
         type: string
         mapping:
           - dps_val: last
-            value: "Remember Last Status"
+            value: memory
           - dps_val: power_on
-            value: "On"
+            value: "on"
           - dps_val: power_off
-            value: "Off"
+            value: "off"
   - entity: select
     category: config
     name: "Backlight Mode"

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

@@ -138,16 +138,15 @@ secondary_entities:
         optional: true
   - entity: select
     category: config
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     dps:
       - id: 38
         type: string
         name: option
         mapping:
           - dps_val: "on"
-            value: "On"
+            value: "on"
           - dps_val: "off"
-            value: "Off"
+            value: "off"
           - dps_val: memory
-            value: "Last State"
+            value: memory

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

@@ -105,8 +105,7 @@ secondary_entities:
           - scale: 60
             step: 60
   - entity: select
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     category: config
     dps:
       - id: 38
@@ -115,11 +114,11 @@ secondary_entities:
         name: option
         mapping:
           - dps_val: power_on
-            value: "On"
+            value: "on"
           - dps_val: power_off
-            value: "Off"
+            value: "off"
           - dps_val: last
-            value: Last state
+            value: memory
   - entity: select
     name: Indicator
     icon: "mdi:led-on"

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

@@ -34,8 +34,7 @@ secondary_entities:
           - scale: 60
             step: 60
   - entity: select
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     category: config
     dps:
       - id: 38
@@ -43,11 +42,11 @@ secondary_entities:
         name: option
         mapping:
           - dps_val: "off"
-            value: "Off"
+            value: "off"
           - dps_val: "on"
-            value: "On"
+            value: "on"
           - dps_val: memory
-            value: Last state
+            value: memory
   - entity: select
     name: Light mode
     icon: "mdi:television-ambient-light"

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

@@ -72,8 +72,7 @@ secondary_entities:
         mapping:
           - scale: 10
   - entity: select
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     category: config
     dps:
       - id: 38
@@ -81,11 +80,11 @@ secondary_entities:
         name: option
         mapping:
           - dps_val: power_off
-            value: "Off"
+            value: "off"
           - dps_val: power_on
-            value: "On"
+            value: "on"
           - dps_val: last
-            value: "Last state"
+            value: memory
   - entity: select
     name: Backlight
     icon: "mdi:television-ambient-light"

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

@@ -121,8 +121,7 @@ secondary_entities:
           - value: true
   - entity: select
     category: config
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     dps:
       - id: 38
         type: string
@@ -130,11 +129,11 @@ secondary_entities:
         optional: true
         mapping:
           - dps_val: "on"
-            value: "On"
+            value: "on"
           - dps_val: "off"
-            value: "Off"
+            value: "off"
           - dps_val: memory
-            value: "Last State"
+            value: memory
   - entity: switch
     name: Overcharge cutoff
     category: config

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

@@ -117,19 +117,18 @@ secondary_entities:
           - value: true
   - entity: select
     category: config
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     dps:
       - id: 38
         type: string
         name: option
         mapping:
           - dps_val: "on"
-            value: "On"
+            value: "on"
           - dps_val: "off"
-            value: "Off"
+            value: "off"
           - dps_val: memory
-            value: "Last State"
+            value: memory
   - entity: switch
     name: Overcharge protection
     category: config

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

@@ -127,19 +127,18 @@ secondary_entities:
           - value: true
   - entity: select
     category: config
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     dps:
       - id: 38
         type: string
         name: option
         mapping:
           - dps_val: "on"
-            value: "On"
+            value: "on"
           - dps_val: "off"
-            value: "Off"
+            value: "off"
           - dps_val: memory
-            value: "Last State"
+            value: memory
   - entity: lock
     translation_key: child_lock
     category: config

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

@@ -92,19 +92,18 @@ secondary_entities:
           - value: true
   - entity: select
     category: config
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     dps:
       - id: 38
         type: string
         name: option
         mapping:
           - dps_val: "on"
-            value: "On"
+            value: "on"
           - dps_val: "off"
-            value: "Off"
+            value: "off"
           - dps_val: memory
-            value: "Last State"
+            value: memory
   - entity: switch
     name: Overcharge cutoff
     category: config

+ 10 - 11
custom_components/tuya_local/devices/somgom_single_switch.yaml

@@ -25,8 +25,7 @@ secondary_entities:
           - scale: 60
         unit: min
   - entity: select
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     category: config
     dps:
       - id: 14
@@ -38,28 +37,28 @@ secondary_entities:
               - dps_val: ["0", "1", "2"]
                 mapping:
                   - dps_val: "0"
-                    value: "Off"
+                    value: "off"
                   - dps_val: "1"
-                    value: "On"
+                    value: "on"
                   - dps_val: "2"
-                    value: Last state
+                    value: memory
               - dps_val: ["memory", "off", "on"]
                 mapping:
                   - dps_val: "off"
-                    value: "Off"
+                    value: "off"
                   - dps_val: "on"
-                    value: "On"
+                    value: "on"
                   - dps_val: memory
-                    value: Last state
+                    value: memory
               # during startup there may be no value, but we need the options
               - dps_val: null
                 mapping:
                   - dps_val: "off"
-                    value: "Off"
+                    value: "off"
                   - dps_val: "on"
-                    value: "On"
+                    value: "on"
                   - dps_val: memory
-                    value: "Last state"
+                    value: memory
   - entity: light
     translation_key: backlight
     category: config

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

@@ -415,8 +415,7 @@ secondary_entities:
           min: 1
           max: 5
   - entity: select
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     category: config
     dps:
       - id: 142
@@ -424,8 +423,8 @@ secondary_entities:
         name: option
         mapping:
           - dps_val: "off"
-            value: "Off"
+            value: "off"
           - dps_val: "on"
-            value: "On"
+            value: "on"
           - dps_val: memory
-            value: Last state
+            value: memory

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

@@ -49,8 +49,7 @@ secondary_entities:
             value: false
           - value: true
   - entity: select
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     category: config
     dps:
       - id: 38
@@ -58,11 +57,11 @@ secondary_entities:
         name: option
         mapping:
           - dps_val: "0"
-            value: "Off"
+            value: "off"
           - dps_val: "1"
-            value: "On"
+            value: "on"
           - dps_val: "2"
-            value: Last state
+            value: memory
   - entity: lock
     translation_key: child_lock
     category: config

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

@@ -74,8 +74,7 @@ secondary_entities:
           - scale: 60
             step: 60
   - entity: select
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     category: config
     dps:
       - id: 14
@@ -83,11 +82,11 @@ secondary_entities:
         name: option
         mapping:
           - dps_val: "off"
-            value: "Off"
+            value: "off"
           - dps_val: "on"
-            value: "On"
-          - dps_val: "memory"
-            value: "Last state"
+            value: "on"
+          - dps_val: memory
+            value: memory
   - entity: select
     name: Indicator light
     icon: "mdi:power"

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

@@ -36,8 +36,7 @@ secondary_entities:
           - scale: 60
             step: 60
   - entity: select
-    name: Initial state
-    icon: "mdi:toggle-switch"
+    translation_key: initial_state
     category: config
     dps:
       - id: 11
@@ -45,11 +44,11 @@ secondary_entities:
         name: option
         mapping:
           - dps_val: "off"
-            value: "Off"
+            value: "off"
           - dps_val: "on"
-            value: "On"
-          - dps_val: "memory"
-            value: Last state
+            value: "on"
+          - dps_val: memory
+            value: memory
         optional: true
   - entity: light
     translation_key: backlight

+ 3 - 0
custom_components/tuya_local/icons.json

@@ -110,6 +110,9 @@
             }
         },
         "select": {
+            "initial_state": {
+                "default": "mdi:toggle-switch"
+            },
             "language": {
                 "default": "mdi:translate"
             },

+ 8 - 0
custom_components/tuya_local/translations/bg.json

@@ -320,6 +320,14 @@
             }
         },
         "select": {
+            "initial_state": {
+                "name": "Начално състояние",
+                "state": {
+                    "off": "Изключено",
+                    "on": "Включено",
+                    "memory": "Памет"
+                }
+            },
             "language": {
                 "name": "Език",
                 "state": {

+ 8 - 0
custom_components/tuya_local/translations/cz.json

@@ -320,6 +320,14 @@
             }
         },
         "select": {
+            "initial_state": {
+                "name": "Počáteční stav",
+                "state": {
+                    "off": "Vypnuto",
+                    "on": "Zapnuto",
+                    "memory": "Paměť"
+                }
+            },
             "language": {
                 "name": "Jazyk",
                 "state": {

+ 8 - 0
custom_components/tuya_local/translations/de.json

@@ -320,6 +320,14 @@
             }
         },
         "select": {
+            "initial_state": {
+                "name": "Startzustand",
+                "state": {
+                    "off": "Aus",
+                    "on": "An",
+                    "memory": "Speicher"
+                }
+            },
             "language": {
                 "name": "Sprache",
                 "state": {

+ 8 - 0
custom_components/tuya_local/translations/el.json

@@ -320,6 +320,14 @@
             }
         },
         "select": {
+            "initial_state": {
+                "name": "Αρχική κατάσταση",
+                "state": {
+                    "on": "Ενεργοποίηση",
+                    "off": "Απενεργοποίηση",
+                    "memory": "Μνήμη"
+                }
+            },
             "language": {
                 "name": "Γλώσσα",
                 "state": {

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

@@ -367,6 +367,14 @@
             }
         },
         "select": {
+            "initial_state": {
+                "name": "Initial state",
+                "state": {
+                    "off": "Off",
+                    "on": "On",
+                    "memory": "Memory"
+                }
+            },
             "language": {
                 "name": "Language",
                 "state": {

+ 8 - 0
custom_components/tuya_local/translations/es.json

@@ -360,6 +360,14 @@
             }
         },
         "select": {
+            "initial_state": {
+                "name": "Estado inicial",
+                "state": {
+                    "off": "Apagado",
+                    "on": "Encendido",
+                    "memory": "Memoria"
+                }
+            },
             "language": {
                 "name": "Idioma",
                 "state": {

+ 8 - 0
custom_components/tuya_local/translations/fr.json

@@ -320,6 +320,14 @@
             }
         },
         "select": {
+            "initial_state": {
+                "name": "État initial",
+                "state": {
+                    "off": "Désactivé",
+                    "on": "Activé",
+                    "memory": "Mémoire"
+                }
+            },
             "language": {
                 "name": "Langue",
                 "state": {

+ 8 - 0
custom_components/tuya_local/translations/hu.json

@@ -320,6 +320,14 @@
             }
         },
         "select": {
+            "initial_state": {
+                "name": "Kezdeti állapot",
+                "state": {
+                    "off": "Ki",
+                    "on": "Be",
+                    "memory": "Memória"
+                }
+            },
             "language": {
                 "name": "Nyelv",
                 "state": {

+ 8 - 0
custom_components/tuya_local/translations/id.json

@@ -320,6 +320,14 @@
             }
         },
         "select": {
+            "initial_state": {
+                "name": "Status awal",
+                "state": {
+                    "off": "Mati",
+                    "on": "Hidup",
+                    "memory": "Memori"
+                }
+            },
             "language": {
                 "name": "Bahasa",
                 "state": {

+ 8 - 0
custom_components/tuya_local/translations/it.json

@@ -320,6 +320,14 @@
             }
         },
         "select": {
+            "initial_state": {
+                "name": "Stato iniziale",
+                "state": {
+                    "off": "Spento",
+                    "on": "Acceso",
+                    "memory": "Memoria"
+                }
+            },
             "language": {
                 "name": "Lingua",
                 "state": {

+ 8 - 0
custom_components/tuya_local/translations/ja.json

@@ -320,6 +320,14 @@
             }
         },
         "select": {
+            "initial_state": {
+                "name": "初期状態",
+                "state": {
+                    "off": "オフ",
+                    "on": "オン",
+                    "memory": "メモリ"
+                }
+            },
             "language": {
                 "name": "言語",
                 "state": {

+ 8 - 0
custom_components/tuya_local/translations/no-NB.json

@@ -320,6 +320,14 @@
             }
         },
         "select": {
+            "initial_state": {
+                "name": "Starttilstand",
+                "state": {
+                    "off": "Av",
+                    "on": "På",
+                    "memory": "Minne"
+                }
+            },
             "language": {
                 "name": "Språk",
                 "state": {

+ 8 - 0
custom_components/tuya_local/translations/pl.json

@@ -320,6 +320,14 @@
             }
         },
         "select": {
+            "initial_state": {
+                "name": "Stan początkowy",
+                "state": {
+                    "off": "Wyłączony",
+                    "on": "Włączony",
+                    "memory": "Pamięć"
+                }
+            },
             "language": {
                 "name": "Język",
                 "state": {

+ 8 - 0
custom_components/tuya_local/translations/pt-BR.json

@@ -320,6 +320,14 @@
             }
         },
         "select": {
+            "initial_state": {
+                "name": "Estado inicial",
+                "state": {
+                    "off": "Desligado",
+                    "on": "Ligado",
+                    "memory": "Memória"
+                }
+            },
             "language": {
                 "name": "Idioma",
                 "state": {

+ 8 - 0
custom_components/tuya_local/translations/ru.json

@@ -320,6 +320,14 @@
             }
         },
         "select": {
+            "initial_state": {
+                "name": "Начальное состояние",
+                "state": {
+                    "off": "Выкл",
+                    "on": "Вкл",
+                    "memory": "Память"
+                }
+            },
             "language": {
                 "name": "Язык",
                 "state": {

+ 8 - 0
custom_components/tuya_local/translations/uk.json

@@ -320,6 +320,14 @@
             }
         },
         "select": {
+            "initial_state": {
+                "name": "Початковий стан",
+                "state": {
+                    "off": "Вимк",
+                    "on": "Увімк",
+                    "memory": "Пам'ять"
+                }
+            },
             "language": {
                 "name": "Мова",
                 "state": {

+ 8 - 0
custom_components/tuya_local/translations/ur.json

@@ -320,6 +320,14 @@
             }
         },
         "select": {
+            "initial_state": {
+                "name": "ابتدائی حالت",
+                "state": {
+                    "off": "آف",
+                    "on": "آن",
+                    "memory": "یاد"
+                }
+            },
             "language": {
                 "name": "زبان",
                 "state": {

+ 8 - 0
custom_components/tuya_local/translations/zh-Hans.json

@@ -367,6 +367,14 @@
             }
         },
         "select": {
+            "initial_state": {
+                "name": "初始状态",
+                "state": {
+                    "off": "关闭",
+                    "on": "打开",
+                    "memory": "记忆"
+                }
+            },
             "language": {
                 "name": "语言",
                 "state": {

+ 8 - 0
custom_components/tuya_local/translations/zh-Hant.json

@@ -320,6 +320,14 @@
             }
         },
         "select": {
+            "initial_state": {
+                "name": "初始狀態",
+                "state": {
+                    "off": "關",
+                    "on": "開",
+                    "memory": "記憶"
+                }
+            },
             "language": {
                 "name": "語言",
                 "state": {

+ 1 - 1
pyproject.toml

@@ -1,2 +1,2 @@
 [tool.black]
-target-version = ["py310", "py311"]
+target-version = ["py312"]

+ 1 - 1
requirements-dev.txt

@@ -1,6 +1,6 @@
 fuzzywuzzy
 levenshtein
-pytest-homeassistant-custom-component>=0.13.152
+pytest-homeassistant-custom-component>=0.13.161
 pytest
 pytest-asyncio
 pytest-cov

+ 3 - 3
tests/devices/test_grid_connect_double_power_point.py

@@ -56,9 +56,9 @@ class TestGridConnectDoubleSwitch(
             INITIAL_DPS,
             self.entities.get("select_initial_state"),
             {
-                "on": "On",
-                "off": "Off",
-                "memory": "Last State",
+                "on": "on",
+                "off": "off",
+                "memory": "memory",
             },
         )
         # Master switch must go last, otherwise its tests interfere with

+ 5 - 5
tests/devices/test_moes_temp_humidity.py

@@ -85,11 +85,11 @@ class TestMoesTempHumidity(
                 },
                 {
                     "dps": INIT_DPS,
-                    "name": "select_power_on_state",
+                    "name": "select_initial_state",
                     "options": {
-                        "on": "On",
-                        "off": "Off",
-                        "memory": "Last State",
+                        "on": "on",
+                        "off": "off",
+                        "memory": "memory",
                     },
                 },
             ]
@@ -119,7 +119,7 @@ class TestMoesTempHumidity(
                 "number_minimum_humidity",
                 "number_timer_1",
                 "number_timer_2",
-                "select_power_on_state",
+                "select_initial_state",
                 "number_high_temperature_switch_level",
                 "switch_high_temperature_switch",
                 "number_high_temperature_alarm_level",

+ 1 - 1
tests/devices/test_simple_switch_with_timerv2.py

@@ -25,7 +25,7 @@ class TestTimedSwitch(BasicNumberTests, SwitchableTests, TuyaDeviceTestCase):
             scale=60,
             unit=UnitOfTime.MINUTES,
         )
-        self.mark_secondary(["number_timer", "select_power_on_state"])
+        self.mark_secondary(["number_timer", "select_initial_state"])
 
     def test_extra_state_attributes_set(self):
         self.assertDictEqual(

+ 3 - 3
tests/devices/test_smartplugv2_energy.py

@@ -81,9 +81,9 @@ class TestSwitchV2Energy(
             INITIAL_DPS,
             self.entities.get("select_initial_state"),
             {
-                "on": "On",
-                "off": "Off",
-                "memory": "Last State",
+                "on": "on",
+                "off": "off",
+                "memory": "memory",
             },
         )
         self.setUpMultiSensors(