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

feat!: make timers use native units

Instead of scaling seconds to minutes, or minutes to hours, use
the raw units the device gives us.

- scaling leaves fractional values which are difficult to work with,
  as they do not correlate to the smaller unit.
- these entities now have the duration class, which has the potential
  to handle display of the values more intelligently.

May break existing automations that are using on device timers with
the scaled values.
Jason Rumney 7 месяцев назад
Родитель
Сommit
27e4934ffc
100 измененных файлов с 184 добавлено и 730 удалено
  1. 2 8
      custom_components/tuya_local/devices/HCT-626_dual_water_timer.yaml
  2. 2 5
      custom_components/tuya_local/devices/amari_ceiling_fanlight.yaml
  3. 4 16
      custom_components/tuya_local/devices/arlec_pb88uha_s2_switch.yaml
  4. 1 4
      custom_components/tuya_local/devices/arlec_rgb_ledstrip.yaml
  5. 1 4
      custom_components/tuya_local/devices/arlec_thermostat_smartplug.yaml
  6. 1 4
      custom_components/tuya_local/devices/asahom_outdoor_rgbcw_lights.yaml
  7. 1 4
      custom_components/tuya_local/devices/asc_wifi_circuit_breaker.yaml
  8. 1 4
      custom_components/tuya_local/devices/atomi_ceiling_fan.yaml
  9. 1 4
      custom_components/tuya_local/devices/atorch_at2pl_breaker.yaml
  10. 1 4
      custom_components/tuya_local/devices/atorch_at4pw_energymeter.yaml
  11. 3 24
      custom_components/tuya_local/devices/atorch_s1wp.yaml
  12. 1 3
      custom_components/tuya_local/devices/aubess_1gang_switch.yaml
  13. 2 6
      custom_components/tuya_local/devices/aubess_2gang_switch.yaml
  14. 3 9
      custom_components/tuya_local/devices/aubess_3gang_switch.yaml
  15. 2 8
      custom_components/tuya_local/devices/avatto_cls02_curtainduallights.yaml
  16. 2 8
      custom_components/tuya_local/devices/avatto_curtain_duallights.yaml
  17. 1 4
      custom_components/tuya_local/devices/aygrochy_inline_wifi_air_vent.yaml
  18. 5 20
      custom_components/tuya_local/devices/bauhn_ap5w0624_powerstrip.yaml
  19. 1 4
      custom_components/tuya_local/devices/ble_hct611_watertimer.yaml
  20. 1 4
      custom_components/tuya_local/devices/ble_solar_light.yaml
  21. 1 4
      custom_components/tuya_local/devices/ble_water_valve.yaml
  22. 1 4
      custom_components/tuya_local/devices/blitzwolf_bwshp6_smartplug.yaml
  23. 2 8
      custom_components/tuya_local/devices/brilliant_double_switch.yaml
  24. 4 16
      custom_components/tuya_local/devices/brilliant_quad_switch.yaml
  25. 1 4
      custom_components/tuya_local/devices/brilliant_single_switch.yaml
  26. 3 12
      custom_components/tuya_local/devices/brilliant_triple_switch.yaml
  27. 1 4
      custom_components/tuya_local/devices/calex_s45cleare27_light.yaml
  28. 1 4
      custom_components/tuya_local/devices/cbi_astute_outdoor_smartswitch.yaml
  29. 1 4
      custom_components/tuya_local/devices/cct_lightbulb.yaml
  30. 1 4
      custom_components/tuya_local/devices/cesmarthome_acwall_outlet.yaml
  31. 1 5
      custom_components/tuya_local/devices/comon_lights.yaml
  32. 2 8
      custom_components/tuya_local/devices/denver_shp200mk2_dualsmartplug.yaml
  33. 1 4
      custom_components/tuya_local/devices/depuley_smart_ceiling_fan.yaml
  34. 1 4
      custom_components/tuya_local/devices/deta_dimmer_switch.yaml
  35. 2 8
      custom_components/tuya_local/devices/digoo_dgsp202.yaml
  36. 1 4
      custom_components/tuya_local/devices/dimming_1ch_switch.yaml
  37. 1 4
      custom_components/tuya_local/devices/dimming_lightbulb.yaml
  38. 1 5
      custom_components/tuya_local/devices/dreamlight_led_strip.yaml
  39. 2 8
      custom_components/tuya_local/devices/dual_power_monitor_smartplug.yaml
  40. 2 8
      custom_components/tuya_local/devices/dual_power_monitor_smartplugv2.yaml
  41. 2 6
      custom_components/tuya_local/devices/elspet_cat_litterbox.yaml
  42. 1 4
      custom_components/tuya_local/devices/enbrighten_cafe_stringlights.yaml
  43. 1 5
      custom_components/tuya_local/devices/enbrighten_curtainlights.yaml
  44. 4 16
      custom_components/tuya_local/devices/es01_powerstrip.yaml
  45. 2 8
      custom_components/tuya_local/devices/espfort_ecspsp_usbsmartplug.yaml
  46. 2 5
      custom_components/tuya_local/devices/fancyled_fpgahdmi2_light.yaml
  47. 1 4
      custom_components/tuya_local/devices/galaxy_projector_light.yaml
  48. 1 4
      custom_components/tuya_local/devices/gaqqee_kws302wf_energymeter.yaml
  49. 1 4
      custom_components/tuya_local/devices/ge_jasco_ultra_pro_toggle_dimmer_v2.yaml
  50. 1 5
      custom_components/tuya_local/devices/ge_jasco_ultra_pro_toggle_switch.yaml
  51. 2 8
      custom_components/tuya_local/devices/ghome_sw19_fanlight.yaml
  52. 1 4
      custom_components/tuya_local/devices/goldair_phet07ea_heater.yaml
  53. 2 8
      custom_components/tuya_local/devices/goldair_portable_airconditioner.yaml
  54. 2 8
      custom_components/tuya_local/devices/gosund_sp112_usbsmartplug.yaml
  55. 4 16
      custom_components/tuya_local/devices/gosund_usb_triple_powerstrip.yaml
  56. 4 16
      custom_components/tuya_local/devices/gosund_wp9rtl_usbpowerstrip.yaml
  57. 2 8
      custom_components/tuya_local/devices/grid_connect_usb_power_point.yaml
  58. 1 4
      custom_components/tuya_local/devices/gts8_40_2P_breaker.yaml
  59. 1 5
      custom_components/tuya_local/devices/hdmi_sync_light.yaml
  60. 1 4
      custom_components/tuya_local/devices/hoenyzy_valve_timer.yaml
  61. 4 16
      custom_components/tuya_local/devices/homemate_multi_switch.yaml
  62. 1 4
      custom_components/tuya_local/devices/ih001_led_controller.yaml
  63. 1 4
      custom_components/tuya_local/devices/ilonda_l88_fishfeeder.yaml
  64. 1 4
      custom_components/tuya_local/devices/ion_wifi_dimmer.yaml
  65. 1 4
      custom_components/tuya_local/devices/keyun_rgb_ceilingfan.yaml
  66. 1 4
      custom_components/tuya_local/devices/ledvance_smart_plabl100x25b.yaml
  67. 1 4
      custom_components/tuya_local/devices/light_string.yaml
  68. 5 20
      custom_components/tuya_local/devices/logicom_powerstrip.yaml
  69. 2 8
      custom_components/tuya_local/devices/loratap_dual_switch.yaml
  70. 2 8
      custom_components/tuya_local/devices/loratap_garage_door.yaml
  71. 1 5
      custom_components/tuya_local/devices/lsc_neon_ledstrip.yaml
  72. 1 4
      custom_components/tuya_local/devices/lscsmartconnect_gardenspotlights.yaml
  73. 2 8
      custom_components/tuya_local/devices/makegood_double_power_point_with_energy.yaml
  74. 2 8
      custom_components/tuya_local/devices/makegood_switch_dual_timer-energy.yaml
  75. 2 8
      custom_components/tuya_local/devices/malmbergs_dual_dimmer.yaml
  76. 1 5
      custom_components/tuya_local/devices/marpou_ceiling_lamp_ledlight.yaml
  77. 1 4
      custom_components/tuya_local/devices/mirabella_genio_usb.yaml
  78. 1 4
      custom_components/tuya_local/devices/mirabella_geniopixel_light.yaml
  79. 5 20
      custom_components/tuya_local/devices/mirabella_power_strip.yaml
  80. 2 8
      custom_components/tuya_local/devices/moes_dual_dimmer.yaml
  81. 4 6
      custom_components/tuya_local/devices/moes_motionsensor_switch.yaml
  82. 4 16
      custom_components/tuya_local/devices/moes_quad_switch.yaml
  83. 1 4
      custom_components/tuya_local/devices/moes_rgb_socket.yaml
  84. 1 4
      custom_components/tuya_local/devices/moes_star_projector.yaml
  85. 3 12
      custom_components/tuya_local/devices/moes_threegang.yaml
  86. 1 4
      custom_components/tuya_local/devices/moesgo_dimmer.yaml
  87. 1 4
      custom_components/tuya_local/devices/moistenland_water_timer.yaml
  88. 1 4
      custom_components/tuya_local/devices/nooie_nsp21_smartplug.yaml
  89. 1 4
      custom_components/tuya_local/devices/nooie_pu13_smartplug.yaml
  90. 4 16
      custom_components/tuya_local/devices/novadigital_quad_switch.yaml
  91. 1 4
      custom_components/tuya_local/devices/orison_chanfok_neo_fan_light.yaml
  92. 1 4
      custom_components/tuya_local/devices/orison_rgb_ceilingfan.yaml
  93. 2 5
      custom_components/tuya_local/devices/outon_smart_lamp.yaml
  94. 1 5
      custom_components/tuya_local/devices/pir_rgbcw_light.yaml
  95. 1 5
      custom_components/tuya_local/devices/pir_spotlight.yaml
  96. 4 16
      custom_components/tuya_local/devices/qnect_usb_powerstrip.yaml
  97. 1 4
      custom_components/tuya_local/devices/qoto_05_water_valve.yaml
  98. 4 16
      custom_components/tuya_local/devices/quad_power_timer.yaml
  99. 4 16
      custom_components/tuya_local/devices/quad_powerstrip.yaml
  100. 5 20
      custom_components/tuya_local/devices/quad_powerstrip_usb.yaml

+ 2 - 8
custom_components/tuya_local/devices/HCT-626_dual_water_timer.yaml

@@ -30,10 +30,7 @@ entities:
         range:
           min: 60
           max: 3600
-        mapping:
-          - scale: 60
-            step: 60
-        unit: min
+        unit: s
   - entity: number
     translation_key: timer_x
     translation_placeholders:
@@ -47,10 +44,7 @@ entities:
         range:
           min: 60
           max: 3600
-        mapping:
-          - scale: 60
-            step: 60
-        unit: min
+        unit: s
   - entity: sensor
     name: Weather delay remaining
     category: diagnostic

+ 2 - 5
custom_components/tuya_local/devices/amari_ceiling_fanlight.yaml

@@ -29,19 +29,16 @@ entities:
   - entity: number
     translation_key: timer
     category: config
+    class: duration
     dps:
       - id: 26
         type: integer
         optional: true
         name: value
-        unit: min
-        precision: 0
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: text
     name: Light control
     hidden: true

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

@@ -50,13 +50,10 @@ entities:
       - id: 9
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     translation_key: timer_x
@@ -67,13 +64,10 @@ entities:
       - id: 10
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     translation_key: timer_x
@@ -84,13 +78,10 @@ entities:
       - id: 11
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     translation_key: timer_x
@@ -101,13 +92,10 @@ entities:
       - id: 12
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: select
     category: config
     translation_key: initial_state

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

@@ -70,10 +70,7 @@ entities:
       - id: 7
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60

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

@@ -109,13 +109,10 @@ entities:
       - id: 4
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: sensor
     class: current
     category: diagnostic

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

@@ -111,13 +111,10 @@ entities:
       - id: 26
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: light
     translation_key: indicator
     category: config

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

@@ -20,10 +20,7 @@ entities:
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
-        unit: min
+        unit: s
   - entity: sensor
     class: current
     category: diagnostic

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

@@ -63,13 +63,10 @@ entities:
       - id: 26
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: switch
     name: Do not disturb
     category: config

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

@@ -27,10 +27,7 @@ entities:
         range:
           min: 0
           max: 360000
-        unit: min
-        mapping:
-          - scale: 60
-            step: 60
+        unit: s
   - entity: sensor
     class: current
     category: diagnostic

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

@@ -18,13 +18,10 @@ entities:
       - id: 9
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 360000
-        mapping:
-          - scale: 60
-            step: 60
   - entity: sensor
     class: current
     dps:

+ 3 - 24
custom_components/tuya_local/devices/atorch_s1wp.yaml

@@ -19,13 +19,10 @@ entities:
       - id: 9
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 360000
-        mapping:
-          - scale: 60
-            step: 60
   - entity: sensor
     class: current
     category: diagnostic
@@ -330,39 +327,32 @@ entities:
     name: Timing off time
     class: duration
     translation_key: timer
-    mode: slider
     dps:
       - id: 125
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 360000
-        mapping:
-          - scale: 60
   - entity: number
     category: config
     name: Timing on time
     class: duration
     translation_key: timer
-    mode: slider
     dps:
       - id: 126
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 60
           max: 359940
-        mapping:
-          - scale: 60
   - entity: number
     category: config
     name: Timing loop on time
     translation_key: timer
     class: duration
-    mode: slider
     dps:
       - id: 127
         type: integer
@@ -371,14 +361,11 @@ entities:
         range:
           min: 60
           max: 359940
-        mapping:
-          - scale: 60
   - entity: number
     category: config
     name: Timing loop off time
     translation_key: timer
     class: duration
-    mode: slider
     dps:
       - id: 128
         type: integer
@@ -387,14 +374,11 @@ entities:
         range:
           min: 60
           max: 359940
-        mapping:
-          - scale: 60
   - entity: number
     category: config
     name: Timing countdown on time
     translation_key: timer
     class: duration
-    mode: slider
     dps:
       - id: 129
         type: integer
@@ -403,14 +387,11 @@ entities:
         range:
           min: 60
           max: 359940
-        mapping:
-          - scale: 60
   - entity: number
     category: config
     name: Timing countdown off time
     translation_key: timer
     class: duration
-    mode: slider
     dps:
       - id: 130
         type: integer
@@ -419,8 +400,6 @@ entities:
         range:
           min: 60
           max: 359940
-        mapping:
-          - scale: 60
   - entity: select
     category: config
     name: Switch state

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

@@ -30,12 +30,10 @@ entities:
       - id: 9
         name: value
         type: integer
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: select
     translation_key: initial_state
     category: config

+ 2 - 6
custom_components/tuya_local/devices/aubess_2gang_switch.yaml

@@ -44,12 +44,10 @@ entities:
       - id: 9
         type: integer
         name: value
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     translation_key: timer_x
@@ -60,12 +58,10 @@ entities:
       - id: 10
         type: integer
         name: value
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: select
     translation_key: initial_state
     category: config

+ 3 - 9
custom_components/tuya_local/devices/aubess_3gang_switch.yaml

@@ -38,12 +38,10 @@ entities:
       - id: 9
         type: integer
         name: value
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     translation_key: timer_x
@@ -54,12 +52,10 @@ entities:
       - id: 10
         type: integer
         name: value
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     translation_key: timer_x
@@ -70,12 +66,10 @@ entities:
       - id: 11
         type: integer
         name: value
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: select
     translation_key: initial_state
     category: config

+ 2 - 8
custom_components/tuya_local/devices/avatto_cls02_curtainduallights.yaml

@@ -95,13 +95,10 @@ entities:
         type: integer
         optional: true
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     name: Light 2 timer
     category: config
@@ -112,13 +109,10 @@ entities:
         type: integer
         optional: true
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: select
     name: Percentage switch
     icon: "mdi:percent-box"

+ 2 - 8
custom_components/tuya_local/devices/avatto_curtain_duallights.yaml

@@ -109,13 +109,10 @@ entities:
         type: integer
         optional: true
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     name: Light 2 timer
     category: config
@@ -126,10 +123,7 @@ entities:
         type: integer
         optional: true
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60

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

@@ -118,13 +118,10 @@ entities:
       - id: 104
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 36000
-        mapping:
-          - scale: 60
-            step: 60
   - entity: sensor
     name: Alarm triggered
     category: diagnostic

+ 5 - 20
custom_components/tuya_local/devices/bauhn_ap5w0624_powerstrip.yaml

@@ -59,13 +59,10 @@ entities:
       - id: 9
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
       - id: 42
         type: string
         name: cycle_time
@@ -85,13 +82,10 @@ entities:
       - id: 10
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     translation_key: timer_x
@@ -102,13 +96,10 @@ entities:
       - id: 11
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     translation_key: timer_x
@@ -119,13 +110,10 @@ entities:
       - id: 12
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     translation_key: timer_x
@@ -136,13 +124,10 @@ entities:
       - id: 13
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: sensor
     category: diagnostic
     class: current

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

@@ -91,14 +91,11 @@ entities:
       - id: 11
         type: integer
         name: value
-        unit: min
+        unit: s
         optional: true
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: select
     name: Smart weather
     icon: "mdi:sun-wireless"

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

@@ -89,13 +89,10 @@ entities:
       - id: 7
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: select
     name: Device mode
     icon: "mdi:lightbulb-auto"

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

@@ -109,14 +109,11 @@ entities:
       - id: 11
         type: integer
         name: value
-        unit: min
+        unit: s
         optional: true
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: switch
     name: Smart weather switch
     icon: "mdi:sun-wireless"

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

@@ -87,13 +87,10 @@ entities:
       - id: 9
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: select
     translation_key: initial_state
     category: config

+ 2 - 8
custom_components/tuya_local/devices/brilliant_double_switch.yaml

@@ -32,13 +32,10 @@ entities:
       - id: 7
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     translation_key: timer_x
@@ -49,13 +46,10 @@ entities:
       - id: 8
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: sensor
     name: Energy
     category: diagnostic

+ 4 - 16
custom_components/tuya_local/devices/brilliant_quad_switch.yaml

@@ -50,13 +50,10 @@ entities:
       - id: 7
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     translation_key: timer_x
@@ -67,13 +64,10 @@ entities:
       - id: 8
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     translation_key: timer_x
@@ -84,13 +78,10 @@ entities:
       - id: 9
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     translation_key: timer_x
@@ -101,13 +92,10 @@ entities:
       - id: 10
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: sensor
     name: Energy
     category: diagnostic

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

@@ -18,13 +18,10 @@ entities:
       - id: 7
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: sensor
     name: Energy
     category: diagnostic

+ 3 - 12
custom_components/tuya_local/devices/brilliant_triple_switch.yaml

@@ -41,13 +41,10 @@ entities:
       - id: 7
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     translation_key: timer_x
@@ -58,13 +55,10 @@ entities:
       - id: 8
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     translation_key: timer_x
@@ -75,13 +69,10 @@ entities:
       - id: 9
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: sensor
     name: Energy
     category: diagnostic

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

@@ -81,13 +81,10 @@ entities:
         type: integer
         optional: true
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: text
     translation_key: scene
     category: config

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

@@ -18,13 +18,10 @@ entities:
       - id: 7
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: select
     category: config
     translation_key: initial_state

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

@@ -50,11 +50,8 @@ entities:
       - id: 26
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
         optional: true

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

@@ -17,10 +17,7 @@ entities:
       - id: 102
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60

+ 1 - 5
custom_components/tuya_local/devices/comon_lights.yaml

@@ -119,8 +119,4 @@ entities:
         range:
           min: 0
           max: 86400
-        unit: min
-        mapping:
-          - scale: 60
-            step: 60
-          - dps_val: null
+        unit: s

+ 2 - 8
custom_components/tuya_local/devices/denver_shp200mk2_dualsmartplug.yaml

@@ -52,13 +52,10 @@ entities:
       - id: 9
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     translation_key: timer_x
@@ -69,13 +66,10 @@ entities:
       - id: 10
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: sensor
     class: current
     category: diagnostic

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

@@ -190,13 +190,10 @@ entities:
         type: integer
         name: value
         optional: true
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     translation_key: timer
     class: duration

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

@@ -37,10 +37,7 @@ entities:
       - id: 6
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60

+ 2 - 8
custom_components/tuya_local/devices/digoo_dgsp202.yaml

@@ -62,13 +62,10 @@ entities:
       - id: 9
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     translation_key: timer_x
@@ -79,10 +76,7 @@ entities:
       - id: 10
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60

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

@@ -44,13 +44,10 @@ entities:
       - id: 6
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: select
     translation_key: initial_state
     category: config

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

@@ -33,11 +33,8 @@ entities:
       - id: 26
         type: integer
         name: value
-        unit: min
+        unit: s
         optional: true
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60

+ 1 - 5
custom_components/tuya_local/devices/dreamlight_led_strip.yaml

@@ -99,11 +99,7 @@ entities:
         range:
           min: 0
           max: 86400
-        unit: min
-        mapping:
-          - scale: 60
-            step: 60
-          - dps_val: null
+        unit: s
   - entity: number
     name: Pixels
     category: config

+ 2 - 8
custom_components/tuya_local/devices/dual_power_monitor_smartplug.yaml

@@ -68,13 +68,10 @@ entities:
       - id: 10
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     translation_key: timer_x
@@ -85,10 +82,7 @@ entities:
       - id: 11
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60

+ 2 - 8
custom_components/tuya_local/devices/dual_power_monitor_smartplugv2.yaml

@@ -69,13 +69,10 @@ entities:
       - id: 9
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     translation_key: timer_x
@@ -86,13 +83,10 @@ entities:
       - id: 10
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: sensor
     class: current
     category: diagnostic

+ 2 - 6
custom_components/tuya_local/devices/elspet_cat_litterbox.yaml

@@ -117,12 +117,10 @@ entities:
       - id: 110
         type: integer
         name: value
-        unit: h
+        unit: min
         range:
           min: 0
           max: 1440
-        mapping:
-          - scale: 60
   - entity: number
     name: Sleep end
     class: duration
@@ -132,12 +130,10 @@ entities:
       - id: 111
         type: integer
         name: value
-        unit: h
+        unit: min
         range:
           min: 0
           max: 1440
-        mapping:
-          - scale: 60
   - entity: binary_sensor
     class: problem
     category: diagnostic

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

@@ -28,13 +28,10 @@ entities:
         type: integer
         optional: true
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: select
     name: Number of lights
     icon: "mdi:led-strip-variant"

+ 1 - 5
custom_components/tuya_local/devices/enbrighten_curtainlights.yaml

@@ -41,15 +41,11 @@ entities:
       - id: 26
         name: value
         type: integer
-        unit: min
+        unit: s
         optional: true
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
-          - dps_val: null
   - entity: text
     translation_key: scene
     category: config

+ 4 - 16
custom_components/tuya_local/devices/es01_powerstrip.yaml

@@ -46,13 +46,10 @@ entities:
       - id: 5
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     translation_key: timer_x
@@ -63,13 +60,10 @@ entities:
       - id: 6
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     translation_key: timer_x
@@ -80,13 +74,10 @@ entities:
       - id: 7
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     name: USB timer
@@ -96,10 +87,7 @@ entities:
       - id: 8
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60

+ 2 - 8
custom_components/tuya_local/devices/espfort_ecspsp_usbsmartplug.yaml

@@ -36,13 +36,10 @@ entities:
       - id: 9
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -51,13 +48,10 @@ entities:
       - id: 10
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: select
     translation_key: initial_state
     category: config

+ 2 - 5
custom_components/tuya_local/devices/fancyled_fpgahdmi2_light.yaml

@@ -53,6 +53,7 @@ entities:
   - entity: number
     translation_key: timer
     category: config
+    class: duration
     dps:
       - id: 26
         type: integer
@@ -61,11 +62,7 @@ entities:
           min: 0
           max: 86400
         optional: true
-        unit: min
-        mapping:
-          - scale: 60
-            step: 60
-          - dps_val: null
+        unit: s
   - entity: select
     name: Scene
     icon: "mdi:palette"

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

@@ -54,10 +54,7 @@ entities:
         range:
           min: 0
           max: 86400
-        unit: min
-        mapping:
-          - scale: 60
-            step: 60
+        unit: s
   - entity: light
     translation_key: laser
     dps:

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

@@ -246,13 +246,10 @@ entities:
         type: integer
         name: value
         optional: true
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: switch
     name: Schedule
     category: config

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

@@ -41,13 +41,10 @@ entities:
       - id: 6
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: select
     category: config
     translation_key: initial_state

+ 1 - 5
custom_components/tuya_local/devices/ge_jasco_ultra_pro_toggle_switch.yaml

@@ -51,11 +51,7 @@ entities:
         type: integer
         optional: true
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - dps_val: null
-          - scale: 60
-            step: 60

+ 2 - 8
custom_components/tuya_local/devices/ghome_sw19_fanlight.yaml

@@ -30,13 +30,10 @@ entities:
       - id: 2
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: light
     dps:
       - id: 5
@@ -57,13 +54,10 @@ entities:
       - id: 7
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: select
     translation_key: initial_state
     category: config

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

@@ -44,10 +44,7 @@ entities:
       - id: 5
         type: integer
         name: value
-        unit: h
+        unit: min
         range:
           min: 0
           max: 1440
-        mapping:
-          - step: 60
-            scale: 60

+ 2 - 8
custom_components/tuya_local/devices/goldair_portable_airconditioner.yaml

@@ -194,13 +194,10 @@ entities:
       - id: 104
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     name: "Off timer"
     category: config
@@ -210,10 +207,7 @@ entities:
       - id: 105
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60

+ 2 - 8
custom_components/tuya_local/devices/gosund_sp112_usbsmartplug.yaml

@@ -101,13 +101,10 @@ entities:
       - id: 9
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     name: USB timer
     category: config
@@ -117,13 +114,10 @@ entities:
       - id: 15
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: select
     translation_key: initial_state
     category: config

+ 4 - 16
custom_components/tuya_local/devices/gosund_usb_triple_powerstrip.yaml

@@ -48,13 +48,10 @@ entities:
       - id: 9
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -65,13 +62,10 @@ entities:
       - id: 10
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -82,13 +76,10 @@ entities:
       - id: 11
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     name: USB Timer
     category: config
@@ -98,13 +89,10 @@ entities:
       - id: 15
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: sensor
     class: current
     category: diagnostic

+ 4 - 16
custom_components/tuya_local/devices/gosund_wp9rtl_usbpowerstrip.yaml

@@ -57,13 +57,10 @@ entities:
       - id: 9
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -74,13 +71,10 @@ entities:
       - id: 10
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -91,13 +85,10 @@ entities:
       - id: 11
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -108,13 +99,10 @@ entities:
       - id: 15
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: lock
     translation_key: child_lock
     category: config

+ 2 - 8
custom_components/tuya_local/devices/grid_connect_usb_power_point.yaml

@@ -24,10 +24,7 @@ entities:
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
-        unit: mi
+        unit: s
   - entity: number
     name: USB timer
     class: duration
@@ -40,10 +37,7 @@ entities:
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
-        unit: min
+        unit: s
   - entity: select
     translation_key: initial_state
     category: config

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

@@ -18,13 +18,10 @@ entities:
       - id: 101
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: select
     translation_key: initial_state
     category: config

+ 1 - 5
custom_components/tuya_local/devices/hdmi_sync_light.yaml

@@ -108,11 +108,7 @@ entities:
           min: 0
           max: 86400
         optional: true
-        unit: min
-        mapping:
-          - scale: 60
-            step: 60
-
+        unit: s
   - entity: select
     name: Installation side
     category: config

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

@@ -17,10 +17,7 @@ entities:
       - id: 9
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60

+ 4 - 16
custom_components/tuya_local/devices/homemate_multi_switch.yaml

@@ -76,14 +76,11 @@ entities:
       - id: 7
         type: integer
         name: value
-        unit: min
+        unit: s
         optional: true
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -94,14 +91,11 @@ entities:
       - id: 8
         type: integer
         name: value
-        unit: min
+        unit: s
         optional: true
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -113,14 +107,11 @@ entities:
       - id: 9
         type: integer
         name: value
-        unit: min
+        unit: s
         optional: true
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
       - id: 3
         name: available
         type: boolean
@@ -140,14 +131,11 @@ entities:
       - id: 10
         type: integer
         name: value
-        unit: min
+        unit: s
         optional: true
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
       - id: 4
         name: available
         type: boolean

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

@@ -104,10 +104,7 @@ entities:
       - id: 26
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60

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

@@ -18,10 +18,7 @@ entities:
       - id: 6
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60

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

@@ -45,10 +45,7 @@ entities:
       - id: 6
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60

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

@@ -152,13 +152,10 @@ entities:
         type: integer
         name: value
         optional: true
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: switch
     name: Main switch
     category: config

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

@@ -171,11 +171,8 @@ entities:
       - id: 26
         type: integer
         name: value
-        unit: min
+        unit: s
         optional: true
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60

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

@@ -111,7 +111,4 @@ entities:
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
-        unit: min
+        unit: s

+ 5 - 20
custom_components/tuya_local/devices/logicom_powerstrip.yaml

@@ -53,13 +53,10 @@ entities:
       - id: 9
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -70,13 +67,10 @@ entities:
       - id: 10
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -87,13 +81,10 @@ entities:
       - id: 11
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -104,13 +95,10 @@ entities:
       - id: 12
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     class: duration
     category: config
@@ -120,10 +108,7 @@ entities:
       - id: 13
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60

+ 2 - 8
custom_components/tuya_local/devices/loratap_dual_switch.yaml

@@ -30,13 +30,10 @@ entities:
       - id: 9
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
       - id: 42
         name: random_time
         type: string
@@ -53,13 +50,10 @@ entities:
       - id: 10
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: select
     translation_key: initial_state
     category: config

+ 2 - 8
custom_components/tuya_local/devices/loratap_garage_door.yaml

@@ -29,13 +29,10 @@ entities:
       - id: 7
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     name: Travel time
     class: duration
@@ -58,10 +55,7 @@ entities:
       - id: 103
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60

+ 1 - 5
custom_components/tuya_local/devices/lsc_neon_ledstrip.yaml

@@ -83,11 +83,7 @@ entities:
         range:
           min: 0
           max: 86400
-        unit: min
-        mapping:
-          - scale: 60
-            step: 60
-          - dps_val: null
+        unit: s
   - entity: number
     name: Pixels
     category: config

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

@@ -77,13 +77,10 @@ entities:
       - id: 26
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: switch
     name: Do not disturb
     icon: "mdi:minus-circle"

+ 2 - 8
custom_components/tuya_local/devices/makegood_double_power_point_with_energy.yaml

@@ -62,13 +62,10 @@ entities:
       - id: 2
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -79,10 +76,7 @@ entities:
       - id: 14
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60

+ 2 - 8
custom_components/tuya_local/devices/makegood_switch_dual_timer-energy.yaml

@@ -33,10 +33,7 @@ entities:
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
-        unit: min
+        unit: s
   - entity: number
     class: duration
     translation_key: timer_x
@@ -50,10 +47,7 @@ entities:
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
-        unit: min
+        unit: s
   - entity: sensor
     class: current
     category: diagnostic

+ 2 - 8
custom_components/tuya_local/devices/malmbergs_dual_dimmer.yaml

@@ -47,13 +47,10 @@ entities:
       - id: 6
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     name: Minimum brightness 2
     category: config
@@ -75,13 +72,10 @@ entities:
       - id: 12
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: select
     translation_key: initial_state
     category: config

+ 1 - 5
custom_components/tuya_local/devices/marpou_ceiling_lamp_ledlight.yaml

@@ -95,11 +95,7 @@ entities:
         range:
           min: 0
           max: 86400
-        unit: min
-        mapping:
-          - scale: 60
-            step: 60
-          - dps_val: null
+        unit: s
   - entity: text
     translation_key: scene
     category: config

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

@@ -22,10 +22,7 @@ entities:
       - id: 2
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60

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

@@ -78,13 +78,10 @@ entities:
       - id: 26
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     name: Scene data reset
     category: config

+ 5 - 20
custom_components/tuya_local/devices/mirabella_power_strip.yaml

@@ -74,13 +74,10 @@ entities:
       - id: 9
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -91,13 +88,10 @@ entities:
       - id: 10
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -108,13 +102,10 @@ entities:
       - id: 11
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -125,13 +116,10 @@ entities:
       - id: 12
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -142,13 +130,10 @@ entities:
       - id: 13
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: select
     category: config
     translation_key: initial_state

+ 2 - 8
custom_components/tuya_local/devices/moes_dual_dimmer.yaml

@@ -126,13 +126,10 @@ entities:
       - id: 6
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     class: duration
     translation_key: timer_x
@@ -143,13 +140,10 @@ entities:
       - id: 12
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: select
     translation_key: initial_state
     category: config

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

@@ -112,27 +112,25 @@ entities:
           max: 3600
   - entity: number
     name: Disable time
+    class: duration
     category: config
     dps:
       - id: 101
         name: value
         type: integer
-        unit: h
+        unit: min
         range:
           min: 0
           max: 1440
-        mapping:
-          - scale: 60
   - entity: number
     name: Enable time
+    class: duration
     category: config
     dps:
       - id: 102
         name: value
         type: integer
-        unit: h
+        unit: min
         range:
           min: 0
           max: 1440
-        mapping:
-          - scale: 60

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

@@ -53,13 +53,10 @@ entities:
       - id: 9
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
       - id: 42
         type: string
         name: random_timer
@@ -76,13 +73,10 @@ entities:
       - id: 10
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -93,13 +87,10 @@ entities:
       - id: 11
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -110,13 +101,10 @@ entities:
       - id: 12
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: select
     translation_key: initial_state
     category: config

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

@@ -82,13 +82,10 @@ entities:
         type: integer
         name: value
         optional: true
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: sensor
     category: diagnostic
     class: current

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

@@ -79,10 +79,7 @@ entities:
       - id: 26
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60

+ 3 - 12
custom_components/tuya_local/devices/moes_threegang.yaml

@@ -38,13 +38,10 @@ entities:
       - id: 7
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -55,13 +52,10 @@ entities:
       - id: 8
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -72,13 +66,10 @@ entities:
       - id: 9
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: select
     category: config
     translation_key: initial_state

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

@@ -51,13 +51,10 @@ entities:
       - id: 6
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: select
     translation_key: initial_state
     category: config

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

@@ -73,13 +73,10 @@ entities:
       - id: 11
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: sensor
     name: Work Mode
     class: enum

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

@@ -18,13 +18,10 @@ entities:
       - id: 9
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: select
     translation_key: light_mode
     category: config

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

@@ -18,13 +18,10 @@ entities:
       - id: 9
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: lock
     translation_key: child_lock
     category: config

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

@@ -48,13 +48,10 @@ entities:
       - id: 7
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -65,13 +62,10 @@ entities:
       - id: 8
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -82,13 +76,10 @@ entities:
       - id: 9
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -99,13 +90,10 @@ entities:
       - id: 10
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: select
     category: config
     translation_key: initial_state

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

@@ -97,10 +97,7 @@ entities:
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
-        unit: min
+        unit: s
   - entity: number
     name: Fan timer
     translation_key: timer

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

@@ -99,10 +99,7 @@ entities:
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
-        unit: min
+        unit: s
   - entity: number
     name: Fan timer
     translation_key: timer

+ 2 - 5
custom_components/tuya_local/devices/outon_smart_lamp.yaml

@@ -109,6 +109,7 @@ entities:
         optional: true
   - entity: number
     translation_key: timer
+    class: duration
     category: config
     dps:
       - id: 26
@@ -118,11 +119,7 @@ entities:
         range:
           min: 0
           max: 86400
-        unit: min
-        mapping:
-          - scale: 60
-            step: 60
-          - dps_val: null
+        unit: s
   - entity: text
     translation_key: scene
     icon: "mdi:palette"

+ 1 - 5
custom_components/tuya_local/devices/pir_rgbcw_light.yaml

@@ -199,11 +199,7 @@ entities:
         range:
           min: 0
           max: 86400
-        unit: min
-        mapping:
-          - scale: 60
-            step: 60
-          - dps_val: null
+        unit: s
   - entity: switch
     name: Manual mode
     category: config

+ 1 - 5
custom_components/tuya_local/devices/pir_spotlight.yaml

@@ -47,11 +47,7 @@ entities:
         range:
           min: 0
           max: 86400
-        unit: min
-        mapping:
-          - scale: 60
-            step: 60
-          - dps_val: null
+        unit: s
   - entity: switch
     name: Manual mode
     category: config

+ 4 - 16
custom_components/tuya_local/devices/qnect_usb_powerstrip.yaml

@@ -52,13 +52,10 @@ entities:
       - id: 9
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -69,13 +66,10 @@ entities:
       - id: 10
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -86,13 +80,10 @@ entities:
       - id: 11
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -102,10 +93,7 @@ entities:
       - id: 15
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60

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

@@ -36,13 +36,10 @@ entities:
       - id: 11
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 84960
-        mapping:
-          - scale: 60
-            step: 60
   - entity: sensor
     category: diagnostic
     class: battery

+ 4 - 16
custom_components/tuya_local/devices/quad_power_timer.yaml

@@ -53,13 +53,10 @@ entities:
       - id: 9
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -70,13 +67,10 @@ entities:
       - id: 10
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -87,13 +81,10 @@ entities:
       - id: 11
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -104,13 +95,10 @@ entities:
       - id: 12
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: select
     translation_key: initial_state
     category: config

+ 4 - 16
custom_components/tuya_local/devices/quad_powerstrip.yaml

@@ -58,13 +58,10 @@ entities:
       - id: 9
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -75,13 +72,10 @@ entities:
       - id: 10
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -92,13 +86,10 @@ entities:
       - id: 11
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -109,13 +100,10 @@ entities:
       - id: 12
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: sensor
     category: diagnostic
     class: current

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

@@ -60,13 +60,10 @@ entities:
       - id: 9
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -77,13 +74,10 @@ entities:
       - id: 10
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -94,13 +88,10 @@ entities:
       - id: 11
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     category: config
     class: duration
@@ -111,13 +102,10 @@ entities:
       - id: 12
         type: integer
         name: value
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: number
     name: USB timer
     class: duration
@@ -127,13 +115,10 @@ entities:
       - id: 13
         name: value
         type: integer
-        unit: min
+        unit: s
         range:
           min: 0
           max: 86400
-        mapping:
-          - scale: 60
-            step: 60
   - entity: sensor
     category: diagnostic
     class: current

Некоторые файлы не были показаны из-за большого количества измененных файлов