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

translations: add night_vision select translation

replaces select "Night vision" and "Nightvision", as well as
deprecates switch "Nightvision", with translated version.

Standardized options to auto, "off" and "on", most were that
already, but some used "Infrared" and "Color" or similar instead
of off and on.

Issue #1708
Jason Rumney 1 месяц назад
Родитель
Сommit
866546e4de
67 измененных файлов с 374 добавлено и 210 удалено
  1. 27 0
      custom_components/tuya_local/__init__.py
  2. 1 1
      custom_components/tuya_local/config_flow.py
  3. 4 5
      custom_components/tuya_local/devices/advwin_6l_petfeeder.yaml
  4. 4 5
      custom_components/tuya_local/devices/arlec_pfc002ha_petfeeder_camera.yaml
  5. 4 5
      custom_components/tuya_local/devices/bcom_intercom_camera.yaml
  6. 14 0
      custom_components/tuya_local/devices/bneta_f1d_petfeeder.yaml
  7. 4 5
      custom_components/tuya_local/devices/camnsmart_e27_camera.yaml
  8. 4 5
      custom_components/tuya_local/devices/ceres_plus_petfeeder.yaml
  9. 4 5
      custom_components/tuya_local/devices/cleverio_cd200_doorbell.yaml
  10. 4 8
      custom_components/tuya_local/devices/door_peephole_camera.yaml
  11. 4 8
      custom_components/tuya_local/devices/emos_ip300_camera.yaml
  12. 3 5
      custom_components/tuya_local/devices/evergreen_birdfeeder.yaml
  13. 1 2
      custom_components/tuya_local/devices/faroro_pettreat_camera.yaml
  14. 1 2
      custom_components/tuya_local/devices/feelneedy_plfp01_petfeeder.yaml
  15. 1 3
      custom_components/tuya_local/devices/frienhund_acf180wa_dualfeeder.yaml
  16. 4 8
      custom_components/tuya_local/devices/garage_door_camera.yaml
  17. 4 5
      custom_components/tuya_local/devices/homemate_ptzcamera.yaml
  18. 4 5
      custom_components/tuya_local/devices/huntertbk_hf6602t_doorbell.yaml
  19. 1 2
      custom_components/tuya_local/devices/igethome_ds1_videodoorbell.yaml
  20. 4 8
      custom_components/tuya_local/devices/kerui_200w_camera.yaml
  21. 4 8
      custom_components/tuya_local/devices/kerui_300w_camera.yaml
  22. 4 5
      custom_components/tuya_local/devices/lindasmart_7s_doorbell.yaml
  23. 4 8
      custom_components/tuya_local/devices/lsc_ptz_camera.yaml
  24. 4 8
      custom_components/tuya_local/devices/lscsmartconnect_camerapetfeeder.yaml
  25. 4 8
      custom_components/tuya_local/devices/lscsmartconnect_outdoorcamera.yaml
  26. 3 4
      custom_components/tuya_local/devices/lscsmartconnect_outdoorptzcamera.yaml
  27. 4 5
      custom_components/tuya_local/devices/lscsmartconnect_videodoorbell.yaml
  28. 1 2
      custom_components/tuya_local/devices/moes_indoorptz_camera.yaml
  29. 1 2
      custom_components/tuya_local/devices/moes_wcmp52_camera.yaml
  30. 4 5
      custom_components/tuya_local/devices/mypin_6l_videopetfeeder.yaml
  31. 4 8
      custom_components/tuya_local/devices/nedis_outdoor_camera.yaml
  32. 4 5
      custom_components/tuya_local/devices/nexsmart_air2_camera.yaml
  33. 4 5
      custom_components/tuya_local/devices/nexsmart_air3_camera.yaml
  34. 4 5
      custom_components/tuya_local/devices/nexsmart_watch2_camera.yaml
  35. 4 5
      custom_components/tuya_local/devices/ningbo_bf314a_petfeeder.yaml
  36. 4 5
      custom_components/tuya_local/devices/petlibro_camera_feeder.yaml
  37. 4 5
      custom_components/tuya_local/devices/petspride_petfeeder_OO15.yaml
  38. 4 5
      custom_components/tuya_local/devices/pinelake_birdfeeder.yaml
  39. 4 5
      custom_components/tuya_local/devices/rhpd10_doorbell_camera.yaml
  40. 4 5
      custom_components/tuya_local/devices/sc116wz3a_camera.yaml
  41. 4 5
      custom_components/tuya_local/devices/smcm_doorbellpro_camera.yaml
  42. 4 5
      custom_components/tuya_local/devices/v330l_petfeeder.yaml
  43. 4 5
      custom_components/tuya_local/devices/yakry_camera_petfeeder.yaml
  44. 8 0
      custom_components/tuya_local/icons.json
  45. 8 0
      custom_components/tuya_local/translations/bg.json
  46. 8 0
      custom_components/tuya_local/translations/ca.json
  47. 8 0
      custom_components/tuya_local/translations/cz.json
  48. 8 0
      custom_components/tuya_local/translations/de.json
  49. 8 0
      custom_components/tuya_local/translations/el.json
  50. 8 0
      custom_components/tuya_local/translations/en.json
  51. 8 0
      custom_components/tuya_local/translations/es.json
  52. 8 0
      custom_components/tuya_local/translations/fr.json
  53. 8 0
      custom_components/tuya_local/translations/hu.json
  54. 8 0
      custom_components/tuya_local/translations/id.json
  55. 8 0
      custom_components/tuya_local/translations/it.json
  56. 8 0
      custom_components/tuya_local/translations/ja.json
  57. 8 0
      custom_components/tuya_local/translations/no-NB.json
  58. 8 0
      custom_components/tuya_local/translations/pl.json
  59. 8 0
      custom_components/tuya_local/translations/pt-BR.json
  60. 8 0
      custom_components/tuya_local/translations/pt-PT.json
  61. 8 0
      custom_components/tuya_local/translations/ro.json
  62. 8 0
      custom_components/tuya_local/translations/ru.json
  63. 8 0
      custom_components/tuya_local/translations/sv.json
  64. 8 0
      custom_components/tuya_local/translations/uk.json
  65. 8 0
      custom_components/tuya_local/translations/ur.json
  66. 8 0
      custom_components/tuya_local/translations/zh-Hans.json
  67. 8 0
      custom_components/tuya_local/translations/zh-Hant.json

+ 27 - 0
custom_components/tuya_local/__init__.py

@@ -928,6 +928,33 @@ async def async_migrate_entry(hass, entry: ConfigEntry):
 
         await async_migrate_entries(hass, entry.entry_id, update_unique_id13_19)
         hass.config_entries.async_update_entry(entry, minor_version=19)
+
+    if entry.version == 13 and entry.minor_version < 20:
+        # Migrate unique ids of existing entities to new id taking into
+        # account translation_key, and standardising naming
+        device_id = get_device_unique_id(entry)
+        conf_file = await hass.async_add_executor_job(
+            get_config,
+            entry.data[CONF_TYPE],
+        )
+        if conf_file is None:
+            _LOGGER.error(
+                NOT_FOUND,
+                entry.data[CONF_TYPE],
+            )
+            return False
+
+        @callback
+        def update_unique_id13_20(entity_entry):
+            """Update the unique id of an entity entry."""
+            # Standardistion of entity naming to use translation_key
+            replacements = {
+                "select_nightvision": "select_night_vision",
+            }
+            return replace_unique_ids(entity_entry, device_id, conf_file, replacements)
+
+        await async_migrate_entries(hass, entry.entry_id, update_unique_id13_20)
+        hass.config_entries.async_update_entry(entry, minor_version=20)
     return True
 
 

+ 1 - 1
custom_components/tuya_local/config_flow.py

@@ -53,7 +53,7 @@ DEVICE_DETAILS_URL = (
 
 class ConfigFlowHandler(ConfigFlow, domain=DOMAIN):
     VERSION = 13
-    MINOR_VERSION = 19
+    MINOR_VERSION = 20
     CONNECTION_CLASS = CONN_CLASS_LOCAL_PUSH
     device = None
     data = {}

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

@@ -57,8 +57,7 @@ entities:
           - dps_val: "2"
             value: high
   - entity: select
-    name: Nightvision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108
@@ -66,11 +65,11 @@ entities:
         name: option
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
+            value: "on"
   - entity: number
     translation_key: volume
     category: config

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

@@ -39,8 +39,7 @@ entities:
           - dps_val: "2"
             value: high
   - entity: select
-    name: Night vision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108
@@ -48,11 +47,11 @@ entities:
         name: option
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
+            value: "on"
   - entity: select
     name: Recording mode
     icon: "mdi:file-video"

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

@@ -78,8 +78,7 @@ entities:
           - dps_val: "2"
             value: high
   - entity: select
-    name: Night vision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108
@@ -88,11 +87,11 @@ entities:
         name: option
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
+            value: "on"
   - entity: sensor
     name: SD status
     class: enum

+ 14 - 0
custom_components/tuya_local/devices/bneta_f1d_petfeeder.yaml

@@ -47,9 +47,23 @@ entities:
             value: medium
           - dps_val: "2"
             value: high
+  - entity: select
+    translation_key: night_vision
+    category: config
+    dps:
+      - id: 108
+        type: boolean
+        optional: true
+        name: option
+        mapping:
+          - dps_val: false
+            value: "off"
+          - dps_val: true
+            value: "on"            
   - entity: switch
     name: Nightvision
     icon: "mdi:weather-night"
+    deprecated: select_night_vision  # 2026-05-31
     category: config
     dps:
       - id: 108

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

@@ -147,8 +147,7 @@ entities:
         name: switch
         optional: true
   - entity: select
-    name: Nightvision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 124
@@ -157,11 +156,11 @@ entities:
         optional: true
         mapping:
           - dps_val: auto
-            value: Auto
+            value: auto
           - dps_val: ir_mode
-            value: "On"
+            value: "on"
           - dps_val: color_mode
-            value: "Off"
+            value: "off"
   - entity: light
     name: Floodlight
     icon: "mdi:light-flood-down"

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

@@ -45,8 +45,7 @@ entities:
         name: switch
         optional: true
   - entity: select
-    name: Nightvision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108
@@ -55,11 +54,11 @@ entities:
         optional: true
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
+            value: "on"
   - entity: button
     name: Format SD card
     icon: "mdi:micro-sd"

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

@@ -54,8 +54,7 @@ entities:
             value: false
             hidden: true
   - entity: select
-    name: Night vision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108
@@ -64,11 +63,11 @@ entities:
         name: option
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
+            value: "on"
   - entity: sensor
     name: SD status
     class: enum

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

@@ -51,8 +51,7 @@ entities:
           - dps_val: "2"
             value: high
   - entity: select
-    name: Nightvision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108
@@ -61,14 +60,11 @@ entities:
         name: option
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
-          - dps_val: null
-            value: Auto
-            hidden: true
+            value: "on"
   - entity: sensor
     name: SD status
     class: enum

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

@@ -75,8 +75,7 @@ entities:
           - dps_val: "2"
             value: high
   - entity: select
-    name: Nightvision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108
@@ -85,14 +84,11 @@ entities:
         optional: true
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
-          - dps_val: null
-            value: Unknown
-            hidden: true
+            value: "on"
   - entity: sensor
     name: SD status
     class: enum

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

@@ -81,14 +81,14 @@ entities:
         optional: true
         force: true
   - entity: select
-    name: Night vision
-    translation_key: light_mode
+    translation_key: night_vision
     category: config
-    icon: "mdi:theme-light-dark"
     dps:
       - id: 108
         type: string
         name: option
+        optional: true
+        force: true
         mapping:
           - dps_val: "0"
             value: "auto"
@@ -96,8 +96,6 @@ entities:
             value: "off"
           - dps_val: "2"
             value: "on"
-        optional: true
-        force: true
   - entity: select
     translation_key: motion_sensitivity
     category: config

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

@@ -21,8 +21,7 @@ entities:
         type: boolean
         name: switch
   - entity: select
-    name: Night vision
-    translation_key: light_mode
+    translation_key: night_vision
     category: config
     dps:
       - id: 108

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

@@ -59,8 +59,7 @@ entities:
           - dps_val: "2"
             value: high
   - entity: select
-    name: Night vision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108

+ 1 - 3
custom_components/tuya_local/devices/frienhund_acf180wa_dualfeeder.yaml

@@ -73,9 +73,7 @@ entities:
         type: boolean
         name: switch
   - entity: select
-    name: Nightvision
-    translation_key: light_mode
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108

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

@@ -34,8 +34,7 @@ entities:
         optional: true
         name: switch
   - entity: select
-    name: Nightvision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108
@@ -44,14 +43,11 @@ entities:
         name: option
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
-          - dps_val: null
-            value: Auto
-            hidden: true
+            value: "on"
   - entity: sensor
     name: SD status
     class: enum

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

@@ -227,8 +227,7 @@ entities:
         type: boolean
         name: switch
   - entity: select
-    name: Nightvision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 124
@@ -236,11 +235,11 @@ entities:
         name: option
         mapping:
           - dps_val: auto
-            value: Auto
+            value: auto
           - dps_val: ir_mode
-            value: Infrared
+            value: "on"
           - dps_val: color_mode
-            value: Visible light
+            value: "off"
   - entity: event
     name: Linked event
     dps:

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

@@ -46,8 +46,7 @@ entities:
             value: false
             hidden: true
   - entity: select
-    name: Night vision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108
@@ -55,11 +54,11 @@ entities:
         name: option
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
+            value: "on"
   - entity: sensor
     name: SD status
     class: enum

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

@@ -29,8 +29,7 @@ entities:
         optional: true
         name: switch
   - entity: select
-    name: Nightvision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108

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

@@ -74,8 +74,7 @@ entities:
           - dps_val: "2"
             value: high
   - entity: select
-    name: Night vision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108
@@ -83,14 +82,11 @@ entities:
         name: option
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
-          - dps_val: null
-            value: Unknown
-            hidden: true
+            value: "on"
   - entity: sensor
     name: SD status
     class: enum

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

@@ -82,8 +82,7 @@ entities:
           - dps_val: "2"
             value: high
   - entity: select
-    name: Night vision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108
@@ -91,14 +90,11 @@ entities:
         name: option
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
-          - dps_val: null
-            value: Unknown
-            hidden: true
+            value: "on"
   - entity: sensor
     name: SD status
     class: enum

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

@@ -50,8 +50,7 @@ entities:
             value: false
             hidden: true
   - entity: select
-    name: Night vision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108
@@ -60,11 +59,11 @@ entities:
         name: option
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
+            value: "on"
   - entity: sensor
     name: SD status
     class: enum

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

@@ -73,8 +73,7 @@ entities:
           - dps_val: "2"
             value: high
   - entity: select
-    name: Nightvision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108
@@ -83,14 +82,11 @@ entities:
         name: option
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
-          - dps_val: null
-            value: Auto
-            hidden: true
+            value: "on"
   - entity: sensor
     name: SD status
     class: enum

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

@@ -48,8 +48,7 @@ entities:
           - dps_val: "2"
             value: high
   - entity: select
-    name: Nightvision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108
@@ -58,14 +57,11 @@ entities:
         name: option
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
-          - dps_val: null
-            value: Auto
-            hidden: true
+            value: "on"
   - entity: sensor
     name: SD status
     class: enum

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

@@ -72,8 +72,7 @@ entities:
           - dps_val: "2"
             value: high
   - entity: select
-    name: Nightvision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108
@@ -82,14 +81,11 @@ entities:
         name: option
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
-          - dps_val: null
-            value: Auto
-            hidden: true
+            value: "on"
   - entity: sensor
     name: SD status
     class: enum

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

@@ -237,8 +237,7 @@ entities:
         type: boolean
         name: switch
   - entity: select
-    name: Nightvision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 124
@@ -246,9 +245,9 @@ entities:
         name: option
         mapping:
           - dps_val: ir_mode
-            value: Infrared
+            value: "on"
           - dps_val: color_mode
-            value: Visible light
+            value: "off"
   - entity: light
     name: Floodlight
     category: config

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

@@ -17,8 +17,7 @@ entities:
         optional: true
         name: switch
   - entity: select
-    name: Nightvision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108
@@ -27,11 +26,11 @@ entities:
         name: option
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
+            value: "on"
   - entity: sensor
     name: SD status
     class: enum

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

@@ -66,8 +66,7 @@ entities:
         type: boolean
         name: switch
   - entity: select
-    name: Night vision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108

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

@@ -67,8 +67,7 @@ entities:
         optional: true
         name: switch
   - entity: select
-    name: Night vision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108

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

@@ -40,8 +40,7 @@ entities:
         optional: true
         name: switch
   - entity: select
-    name: Night vision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108
@@ -50,11 +49,11 @@ entities:
         name: option
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
+            value: "on"
   - entity: sensor
     name: SD status
     translation_key: status

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

@@ -75,8 +75,7 @@ entities:
           - dps_val: "2"
             value: high
   - entity: select
-    name: Night vision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108
@@ -85,14 +84,11 @@ entities:
         optional: true
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
-          - dps_val: null
-            value: Unknown
-            hidden: true
+            value: "on"
   - entity: sensor
     name: SD capacity
     category: diagnostic

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

@@ -103,8 +103,7 @@ entities:
         optional: true
 
   - entity: select
-    name: Night vision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     # Night Vision Mode Selector(matches basic_nightvision: 108)
     dps:
@@ -114,11 +113,11 @@ entities:
         optional: true
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
+            value: "on"
 
   # ------------------------------------
   # 4. Detection & Alarm

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

@@ -109,8 +109,7 @@ entities:
         name: switch
 
   - entity: select
-    name: Night vision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     # Night Vision Mode Selector (matches nightvision_mode: 124)
     dps:
@@ -119,11 +118,11 @@ entities:
         name: option
         mapping:
           - dps_val: "auto"
-            value: Auto
+            value: auto
           - dps_val: "color_mode"
-            value: Color Night Vision
+            value: "off"
           - dps_val: "ir_mode"
-            value: Infrared Night Vision
+            value: "on"
 
   # ------------------------------------
   # 4. Detection & Alarm

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

@@ -88,8 +88,7 @@ entities:
         optional: true
 
   - entity: select
-    name: Night vision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     # Night Vision Mode Selector (matches basic_nightvision: 108)
     dps:
@@ -99,11 +98,11 @@ entities:
         optional: true
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
+            value: "on"
 
   # ------------------------------------
   # 4. Detection & Alarm

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

@@ -123,8 +123,7 @@ entities:
         optional: true
         name: button
   - entity: select
-    name: Night vision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 124
@@ -132,11 +131,11 @@ entities:
         name: option
         mapping:
           - dps_val: auto
-            value: Auto
+            value: auto
           - dps_val: ir_mode
-            value: Infrared
+            value: "on"
           - dps_val: color_mode
-            value: Color
+            value: "off"
   - entity: select
     name: Motion detect minimum interval
     icon: "mdi:motion-sensor"

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

@@ -38,8 +38,7 @@ entities:
         type: boolean
         name: switch
   - entity: select
-    name: Nightvision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108
@@ -47,11 +46,11 @@ entities:
         name: option
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
+            value: "on"
   - entity: button
     name: Memory card format
     icon: "mdi:micro-sd"

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

@@ -32,8 +32,7 @@ entities:
         optional: true
         name: switch
   - entity: select
-    name: Night vision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108
@@ -42,11 +41,11 @@ entities:
         name: option
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
+            value: "on"
   - entity: number
     name: Sound volume
     icon: "mdi:volume-high"

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

@@ -80,20 +80,19 @@ entities:
         optional: true
         force: true
   - entity: select
-    name: Night vision
+    translation_key: night_vision
     category: config
-    icon: "mdi:theme-light-dark"
     dps:
       - id: 108
         type: string
         name: option
         mapping:
           - dps_val: "0"
-            value: "Auto"
+            value: "auto"
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
+            value: "on"
         optional: true
         force: true
   - entity: select

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

@@ -54,8 +54,7 @@ entities:
             value: false
             hidden: true
   - entity: select
-    name: Night vision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108
@@ -64,11 +63,11 @@ entities:
         name: option
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
+            value: "on"
   - entity: sensor
     name: SD status
     class: enum

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

@@ -61,8 +61,7 @@ entities:
           - dps_val: "2"
             value: high
   - entity: select
-    name: Nightvision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108
@@ -71,11 +70,11 @@ entities:
         name: option
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
+            value: "on"
   - entity: sensor
     name: SD status
     class: enum

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

@@ -50,8 +50,7 @@ entities:
           - dps_val: "2"
             value: high
   - entity: select
-    name: Nightvision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108
@@ -59,11 +58,11 @@ entities:
         name: option
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
+            value: "on"
   - entity: sensor
     name: SD status
     class: enum

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

@@ -102,8 +102,7 @@ entities:
           - dps_val: "2"
             value: high
   - entity: select
-    name: Nightvision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108
@@ -112,11 +111,11 @@ entities:
         optional: true
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
+            value: "on"
   - entity: binary_sensor
     name: Food empty
     class: problem

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

@@ -66,8 +66,7 @@ entities:
           - dps_val: "2"
             value: high
   - entity: select
-    name: Night vision
-    icon: "mdi:weather-night"
+    translation_key: night_vision
     category: config
     dps:
       - id: 108
@@ -75,11 +74,11 @@ entities:
         name: option
         mapping:
           - dps_val: "0"
-            value: Auto
+            value: auto
           - dps_val: "1"
-            value: "Off"
+            value: "off"
           - dps_val: "2"
-            value: "On"
+            value: "on"
   - entity: sensor
     name: SD status
     class: enum

+ 8 - 0
custom_components/tuya_local/icons.json

@@ -533,6 +533,14 @@
             "motion_sensitivity": {
                 "default": "mdi:motion-sensor"
             },
+            "night_vision": {
+                "default": "mdi:theme-light-dark",
+                "state": {
+                    "off": "mdi:weather-sunny",
+                    "on": "mdi:weather-night",
+                    "auto": "mdi:theme-light-dark"
+                }
+            },
             "recipe": {
                 "default": "mdi:nutrition",
                 "state": {

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

@@ -714,6 +714,14 @@
                     "high": "Високо"
                 }
             },
+            "night_vision": {
+                "name": "Нощно виждане",
+                "state": {
+                    "off": "Изключено",
+                    "on": "Включено",
+                    "auto": "Автоматично"
+                }
+            },
             "recipe": {
                 "name": "Рецепта",
                 "state": {

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

@@ -714,6 +714,14 @@
                     "high": "Alt"
                 }
             },
+            "night_vision": {
+                "name": "Visión nocturna",
+                "state": {
+                    "off": "Desactivado",
+                    "on": "Activado",
+                    "auto": "Automático"
+                }
+            },
             "recipe": {
                 "name": "Recepta",
                 "state": {

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

@@ -714,6 +714,14 @@
                     "high": "Vysoká"
                 }
             },
+            "night_vision": {
+                "name": "Noční vidění",
+                "state": {
+                    "off": "Vypnuto",
+                    "on": "Zapnuto",
+                    "auto": "Auto"
+                }
+            },
             "recipe": {
                 "name": "Recept",
                 "state": {

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

@@ -714,6 +714,14 @@
                     "high": "Hoch"
                 }
             },
+            "night_vision": {
+                "name": "Nachtsicht",
+                "state": {
+                    "off": "Aus",
+                    "on": "An",
+                    "auto": "Auto"
+                }
+            },
             "recipe": {
                 "name": "Rezept",
                 "state": {

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

@@ -714,6 +714,14 @@
                     "high": "Υψηλή"
                 }
             },
+            "night_vision": {
+                "name": "Νυχτερινή όραση",
+                "state": {
+                    "off": "Απενεργοποίηση",
+                    "on": "Ενεργοποίηση",
+                    "auto": "Αυτόματο"
+                }
+            },
             "recipe": {
                 "name": "Συνταγή",
                 "state": {

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

@@ -714,6 +714,14 @@
                     "high": "High"
                 }
             },
+            "night_vision": {
+                "name": "Night vision",
+                "state": {
+                    "off": "Off",
+                    "on": "On",
+                    "auto": "Auto"
+                }
+            },
             "recipe": {
                 "name": "Recipe",
                 "state": {

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

@@ -714,6 +714,14 @@
                     "high": "Alto"
                 }
             },
+            "night_vision": {
+                "name": "Visión nocturna",
+                "state": {
+                    "off": "Apagado",
+                    "on": "Encendido",
+                    "auto": "Auto"
+                }
+            },
             "recipe": {
                 "name": "Receta",
                 "state": {

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

@@ -714,6 +714,14 @@
                     "high": "Haut"
                 }
             },
+            "night_vision": {
+                "name": "Vision nocturne",
+                "state": {
+                    "off": "Désactivé",
+                    "on": "Activé",
+                    "auto": "Auto"
+                }
+            },
             "recipe": {
                 "name": "Recette",
                 "state": {

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

@@ -714,6 +714,14 @@
                     "high": "Magas"
                 }
             },
+            "night_vision": {
+                "name": "Éjjellátó",
+                "state": {
+                    "off": "Ki",
+                    "on": "Be",
+                    "auto": "Auto"
+                }
+            },
             "recipe": {
                 "name": "Recept",
                 "state": {

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

@@ -714,6 +714,14 @@
                     "high": "Tinggi"
                 }
             },
+            "night_vision": {
+                "name": "Penglihatan malam",
+                "state": {
+                    "off": "Mati",
+                    "on": "Hidup",
+                    "auto": "Otomatis"
+                }
+            },
             "recipe": {
                 "name": "Resep",
                 "state": {

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

@@ -714,6 +714,14 @@
                     "high": "Alto"
                 }
             },
+            "night_vision": {
+                "name": "Visione notturna",
+                "state": {
+                    "off": "Spento",
+                    "on": "Acceso",
+                    "auto": "Auto"
+                }
+            },
             "recipe": {
                 "name": "Ricetta",
                 "state": {

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

@@ -714,6 +714,14 @@
                     "high": "高い"
                 }
             },
+            "night_vision": {
+                "name": "ナイトビジョン",
+                "state": {
+                    "off": "オフ",
+                    "on": "オン",
+                    "auto": "自動"
+                }
+            },
             "recipe": {
                 "name": "レシピ",
                 "state": {

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

@@ -714,6 +714,14 @@
                     "high": "Høy"
                 }
             },
+            "night_vision": {
+                "name": "Nattvisjon",
+                "state": {
+                    "off": "Av",
+                    "on": "På",
+                    "auto": "Auto"
+                }
+            },
             "recipe": {
                 "name": "Oppskrift",
                 "state": {

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

@@ -714,6 +714,14 @@
                     "high": "Wysoki"
                 }
             },
+            "night_vision": {
+                "name": "Nocna wizja",
+                "state": {
+                    "off": "Wyłączony",
+                    "on": "Włączony",
+                    "auto": "Auto"
+                }
+            },
             "recipe": {
                 "name": "Przepis",
                 "state": {

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

@@ -714,6 +714,14 @@
                     "high": "Alto"
                 }
             },
+            "night_vision": {
+                "name": "Visão noturna",
+                "state": {
+                    "off": "Desligado",
+                    "on": "Ligado",
+                    "auto": "Automático"
+                }
+            },
             "recipe": {
                 "name": "Receita",
                 "state": {

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

@@ -714,6 +714,14 @@
                     "high": "Alto"
                 }
             },
+            "night_vision": {
+                "name": "Visão noturna",
+                "state": {
+                    "off": "Desligado",
+                    "on": "Ligado",
+                    "auto": "Automático"
+                }
+            },
             "recipe": {
                 "name": "Receita",
                 "state": {

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

@@ -714,6 +714,14 @@
                     "high": "Ridicat"
                 }
             },
+            "night_vision": {
+                "name": "Viziune nocturnă",
+                "state": {
+                    "off": "Oprit",
+                    "on": "Pornit",
+                    "auto": "Auto"
+                }
+            },
             "recipe": {
                 "name": "Rețetă",
                 "state": {

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

@@ -714,6 +714,14 @@
                     "high": "Высокий"
                 }
             },
+            "night_vision": {
+                "name": "Ночное видение",
+                "state": {
+                    "off": "Выкл",
+                    "on": "Вкл",
+                    "auto": "Авто"
+                }
+            },
             "recipe": {
                 "name": "Рецепт",
                 "state": {

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

@@ -714,6 +714,14 @@
                     "high": "Hög"
                 }
             },
+            "night_vision": {
+                "name": "Nattvision",
+                "state": {
+                    "off": "Av",
+                    "on": "På",
+                    "auto": "Auto"
+                }
+            },
             "recipe": {
                 "name": "Recept",
                 "state": {

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

@@ -714,6 +714,14 @@
                     "high": "Високий"
                 }
             },
+            "night_vision": {
+                "name": "Нічное видение",
+                "state": {
+                    "off": "Вимк",
+                    "on": "Увімк",
+                    "auto": "Авто"
+                }
+            },
             "recipe": {
                 "name": "Рецепт",
                 "state": {

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

@@ -714,6 +714,14 @@
                     "high": "زیادہ"
                 }
             },
+            "night_vision": {
+                "name": "نائٹ وژن",
+                "state": {
+                    "off": "آف",
+                    "on": "آن",
+                    "auto": "خود کار"
+                }
+            },
             "recipe": {
                 "name": "ریسیپی",
                 "state": {

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

@@ -714,6 +714,14 @@
                     "high": "高"
                 }
             },
+            "night_vision": {
+                "name": "夜视",
+                "state": {
+                    "off": "关闭",
+                    "on": "打开",
+                    "auto": "自动"
+                }
+            },
             "recipe": {
                 "name": "菜谱",
                 "state": {

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

@@ -714,6 +714,14 @@
                     "high": "高"
                 }
             },
+            "night_vision": {
+                "name": "夜視",
+                "state": {
+                    "off": "關",
+                    "on": "開",
+                    "auto": "自動"
+                }
+            },
             "recipe": {
                 "name": "食譜",
                 "state": {