Procházet zdrojové kódy

Timers: eliminate more explicit mdi:timer and related icons

- add `translation_key: timer` to more number and select entities
  that are timers by another name.
- remove icons from `class: duration` sensors

Explicit timer icons remain for now on number entities that are
configuring some duration that doesn't strictly match with a "Timer".

Issue #1579
Jason Rumney před 1 rokem
rodič
revize
56134d35dd
42 změnil soubory, kde provedl 50 přidání a 75 odebrání
  1. 1 1
      custom_components/tuya_local/devices/alecoair_d12_home_dehumidifier.yaml
  2. 1 1
      custom_components/tuya_local/devices/asc_wifi_circuit_breaker.yaml
  3. 1 1
      custom_components/tuya_local/devices/atomi_ceiling_fan.yaml
  4. 7 8
      custom_components/tuya_local/devices/atorch_s1wp.yaml
  5. 0 1
      custom_components/tuya_local/devices/aubess_rainpoint_irrigation_system.yaml
  6. 1 1
      custom_components/tuya_local/devices/ble_water_valve.yaml
  7. 0 1
      custom_components/tuya_local/devices/breville_easyair_purifier.yaml
  8. 0 1
      custom_components/tuya_local/devices/breville_smartairconnect_purifier.yaml
  9. 1 1
      custom_components/tuya_local/devices/calex_convector_heater.yaml
  10. 0 1
      custom_components/tuya_local/devices/catit_pixi_smart_fountain.yaml
  11. 2 3
      custom_components/tuya_local/devices/cecotec_fan_light.yaml
  12. 1 1
      custom_components/tuya_local/devices/dongguan_garage_door_opener.yaml
  13. 0 1
      custom_components/tuya_local/devices/ebac_dj4000_dehumidifier.yaml
  14. 1 1
      custom_components/tuya_local/devices/es01_powerstrip.yaml
  15. 0 1
      custom_components/tuya_local/devices/etersky_aroma_diffuser.yaml
  16. 1 1
      custom_components/tuya_local/devices/evsun_evcharger.yaml
  17. 1 1
      custom_components/tuya_local/devices/ge_jasco_ultra_pro_toggle_dimmer_v2.yaml
  18. 0 1
      custom_components/tuya_local/devices/gratkit_filament_dryer.yaml
  19. 2 2
      custom_components/tuya_local/devices/grid_connect_usb_power_point.yaml
  20. 2 2
      custom_components/tuya_local/devices/holman_wx1_taptimer.yaml
  21. 6 6
      custom_components/tuya_local/devices/holman_wx2_taptimer.yaml
  22. 1 2
      custom_components/tuya_local/devices/immax_neo_light_vento.yaml
  23. 0 1
      custom_components/tuya_local/devices/inkbird_sousvide_cooker.yaml
  24. 1 1
      custom_components/tuya_local/devices/inow_heater_element_v2.yaml
  25. 0 1
      custom_components/tuya_local/devices/kogan_bladeless_fan.yaml
  26. 1 1
      custom_components/tuya_local/devices/ledkia_fan_light.yaml
  27. 1 1
      custom_components/tuya_local/devices/logicom_powerstrip.yaml
  28. 1 1
      custom_components/tuya_local/devices/loratap_relay.yaml
  29. 1 1
      custom_components/tuya_local/devices/m027_curtain.yaml
  30. 0 5
      custom_components/tuya_local/devices/neatsvor_x600_vacuum.yaml
  31. 2 2
      custom_components/tuya_local/devices/nedis_mobile_airconditioner.yaml
  32. 0 5
      custom_components/tuya_local/devices/proscenic_m9_vacuum.yaml
  33. 1 1
      custom_components/tuya_local/devices/qnect_usb_powerstrip.yaml
  34. 2 2
      custom_components/tuya_local/devices/royalclima_rcb150_ventilation.yaml
  35. 1 1
      custom_components/tuya_local/devices/simple_gate_opener.yaml
  36. 1 4
      custom_components/tuya_local/devices/smart_watering_device.yaml
  37. 2 2
      custom_components/tuya_local/devices/sunbeam_dual_bedwarmer.yaml
  38. 2 2
      custom_components/tuya_local/devices/tesla_airconditioner.yaml
  39. 1 1
      custom_components/tuya_local/devices/tontine_039-WIFI_blanket.yaml
  40. 2 2
      custom_components/tuya_local/devices/vivion_airconditioner.yaml
  41. 1 1
      custom_components/tuya_local/devices/yidi_fan_light_switch.yaml
  42. 1 1
      custom_components/tuya_local/devices/zx_g30_alarm.yaml

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

@@ -85,7 +85,7 @@ secondary_entities:
         name: lock
   - entity: select
     name: Countdown
-    icon: "mdi:timer"
+    translation_key: timer
     category: config
     dps:
       - id: 12

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

@@ -10,7 +10,7 @@ primary_entity:
 secondary_entities:
   - entity: number
     name: Countdown
-    icon: "mdi:timer"
+    translation_key: timer
     category: config
     dps:
       - id: 7

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

@@ -58,7 +58,7 @@ secondary_entities:
   - entity: number
     name: Light timer
     category: config
-    icon: "mdi:timer"
+    translation_key: timer
     dps:
       - id: 26
         type: integer

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

@@ -14,7 +14,7 @@ secondary_entities:
   - entity: number
     category: config
     name: Countdown
-    icon: "mdi:timer"
+    translation_key: timer
     dps:
       - id: 9
         type: integer
@@ -321,7 +321,6 @@ secondary_entities:
     name: Countdown timer
     category: diagnostic
     class: duration
-    icon: "mdi:timer-star"
     dps:
       - id: 124
         name: sensor
@@ -330,7 +329,7 @@ secondary_entities:
   - entity: number
     category: config
     name: Timing off time
-    icon: "mdi:timer"
+    translation_key: timer
     mode: slider
     dps:
       - id: 125
@@ -345,7 +344,7 @@ secondary_entities:
   - entity: number
     category: config
     name: Timing on time
-    icon: "mdi:timer"
+    translation_key: timer
     mode: slider
     dps:
       - id: 126
@@ -360,7 +359,7 @@ secondary_entities:
   - entity: number
     category: config
     name: Timing loop on time
-    icon: "mdi:timer"
+    translation_key: timer
     mode: slider
     dps:
       - id: 127
@@ -375,7 +374,7 @@ secondary_entities:
   - entity: number
     category: config
     name: Timing loop off time
-    icon: "mdi:timer"
+    translation_key: timer
     mode: slider
     dps:
       - id: 128
@@ -390,7 +389,7 @@ secondary_entities:
   - entity: number
     category: config
     name: Timing countdown on time
-    icon: "mdi:timer"
+    translation_key: timer
     mode: slider
     dps:
       - id: 129
@@ -405,7 +404,7 @@ secondary_entities:
   - entity: number
     category: config
     name: Timing countdown off time
-    icon: "mdi:timer"
+    translation_key: timer
     mode: slider
     dps:
       - id: 130

+ 0 - 1
custom_components/tuya_local/devices/aubess_rainpoint_irrigation_system.yaml

@@ -76,7 +76,6 @@ secondary_entities:
     category: diagnostic
     class: duration
     name: Remaining time
-    icon: "mdi:timer"
     dps:
       - id: 104
         type: integer

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

@@ -107,7 +107,7 @@ secondary_entities:
   - entity: number
     name: Irrigation time
     category: config
-    icon: "mdi:timer"
+    translation_key: timer
     dps:
       - id: 11
         type: integer

+ 0 - 1
custom_components/tuya_local/devices/breville_easyair_purifier.yaml

@@ -67,7 +67,6 @@ secondary_entities:
     name: Time left
     category: diagnostic
     class: duration
-    icon: "mdi:timer"
     dps:
       - id: 20
         name: sensor

+ 0 - 1
custom_components/tuya_local/devices/breville_smartairconnect_purifier.yaml

@@ -82,7 +82,6 @@ secondary_entities:
     name: Time left
     category: diagnostic
     class: duration
-    icon: "mdi:timer"
     dps:
       - id: 20
         name: sensor

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

@@ -127,7 +127,7 @@ secondary_entities:
             value: 24 hours
   - entity: sensor
     name: Time remaining
-    icon: "mdi:timer"
+    class: duration
     category: diagnostic
     dps:
       - id: 20

+ 0 - 1
custom_components/tuya_local/devices/catit_pixi_smart_fountain.yaml

@@ -86,7 +86,6 @@ secondary_entities:
   - entity: sensor
     name: UV runtime
     class: duration
-    icon: "mdi:timer-outline"
     category: diagnostic
     dps:
       - id: 11

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

@@ -91,8 +91,7 @@ secondary_entities:
         #     - dps_val: night
         #       value: night
   - entity: select
-    name: timer
-    icon: "mdi:timer"
+    translation_key: timer
     dps:
       - id: 22
         name: option
@@ -101,7 +100,7 @@ secondary_entities:
           - dps_val: "cancel"
             value: "cancel"
           - dps_val: "1h"
-            value: "1 hours"
+            value: "1 hour"
           - dps_val: "2h"
             value: "2 hours"
           - dps_val: "3h"

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

@@ -30,7 +30,7 @@ primary_entity:
 secondary_entities:
   - entity: number
     name: Countdown
-    icon: mdi:timer-lock
+    translation_key: timer
     category: config
     dps:
       - id: 2

+ 0 - 1
custom_components/tuya_local/devices/ebac_dj4000_dehumidifier.yaml

@@ -112,7 +112,6 @@ secondary_entities:
   - entity: sensor
     name: Time left
     category: diagnostic
-    icon: "mdi:timer-outline"
     class: duration
     dps:
       - id: 18

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

@@ -78,7 +78,7 @@ secondary_entities:
   - entity: number
     category: config
     name: USB timer
-    icon: "mdi:timer"
+    translation_key: timer
     dps:
       - id: 8
         name: value

+ 0 - 1
custom_components/tuya_local/devices/etersky_aroma_diffuser.yaml

@@ -98,7 +98,6 @@ secondary_entities:
   - entity: sensor
     name: Time remaining
     class: duration
-    icon: "mdi:timer"
     category: diagnostic
     dps:
       - id: 5

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

@@ -267,7 +267,7 @@ secondary_entities:
   - entity: number
     name: Delayed charge timer
     category: config
-    icon: "mdi:timer"
+    translation_key: timer
     dps:
       - id: 28
         type: integer

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

@@ -35,7 +35,7 @@ secondary_entities:
   - entity: number
     category: config
     name: Countdown
-    icon: "mdi:timer"
+    translation_key: timer
     dps:
       - id: 6
         name: value

+ 0 - 1
custom_components/tuya_local/devices/gratkit_filament_dryer.yaml

@@ -33,7 +33,6 @@ secondary_entities:
         class: measurement
   - entity: sensor
     name: Time remaining
-    icon: "mdi:timer-sand"
     class: duration
     dps:
       - id: 101

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

@@ -15,7 +15,7 @@ secondary_entities:
         name: switch
   - entity: number
     name: Outlet timer
-    icon: "mdi:timer"
+    translation_key: timer
     category: config
     dps:
       - id: 9
@@ -30,7 +30,7 @@ secondary_entities:
         unit: mi
   - entity: number
     name: USB timer
-    icon: "mdi:timer"
+    translation_key: timer
     category: config
     dps:
       - id: 10

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

@@ -92,9 +92,9 @@ secondary_entities:
         range:
           min: 0
           max: 60
-  - entity: number
+  - entity: sensor
     name: Time left
-    icon: "mdi:timer"
+    class: duration
     category: diagnostic
     dps:
       - id: 109

+ 6 - 6
custom_components/tuya_local/devices/holman_wx2_taptimer.yaml

@@ -91,7 +91,7 @@ secondary_entities:
             value: "Rain Delay"
   - entity: number
     name: Manual timer 1
-    icon: "mdi:timer"
+    translation_key: timer
     category: config
     dps:
       - id: 107
@@ -101,9 +101,9 @@ secondary_entities:
         range:
           min: 0
           max: 60
-  - entity: number
+  - entity: sensor
     name: Time left 1
-    icon: "mdi:timer"
+    class: duration
     category: diagnostic
     dps:
       - id: 109
@@ -540,7 +540,7 @@ secondary_entities:
             value: "Rain Delay"
   - entity: number
     name: Manual timer 2
-    icon: "mdi:timer"
+    translation_key: timer
     category: config
     dps:
       - id: 154
@@ -550,9 +550,9 @@ secondary_entities:
         range:
           min: 0
           max: 60
-  - entity: number
+  - entity: sensor
     name: Time left 2  # doesn't seem to get populated with manual watering
-    icon: "mdi:timer"
+    class: duration
     category: diagnostic
     dps:
       - id: 156

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

@@ -42,8 +42,7 @@ secondary_entities:
         type: boolean
         name: switch
   - entity: select
-    name: timer
-    icon: "mdi:timer"
+    translation_key: timer
     category: config
     dps:
       - id: 22

+ 0 - 1
custom_components/tuya_local/devices/inkbird_sousvide_cooker.yaml

@@ -70,7 +70,6 @@ secondary_entities:
     name: Remaining time
     category: diagnostic
     class: duration
-    icon: "mdi:timer"
     dps:
       - id: 106
         type: integer

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

@@ -52,7 +52,7 @@ secondary_entities:
         name: switch
   - entity: select
     name: Boost
-    icon: "mdi:timer-outline"
+    translation_key: timer
     dps:
       - id: 19
         type: string

+ 0 - 1
custom_components/tuya_local/devices/kogan_bladeless_fan.yaml

@@ -118,7 +118,6 @@ secondary_entities:
   - entity: sensor
     name: Time Remaining
     class: duration
-    icon: "mdi:timer"
     category: diagnostic
     dps:
       - id: 12

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

@@ -69,7 +69,7 @@ secondary_entities:
           - scale: 10
   - entity: number
     name: Fan timer
-    icon: "mdi:timer"
+    translation_key: timer
     category: config
     dps:
       - id: 64

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

@@ -99,7 +99,7 @@ secondary_entities:
   - entity: number
     category: config
     name: USB timer
-    icon: "mdi:timer"
+    translation_key: timer
     dps:
       - id: 13
         name: value

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

@@ -23,7 +23,7 @@ primary_entity:
 secondary_entities:
   - entity: number
     name: Countdown
-    icon: "mdi:timer"
+    translation_key: timer
     category: config
     dps:
       - id: 9

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

@@ -69,7 +69,7 @@ secondary_entities:
             value: Night
   - entity: sensor
     name: Time remaining
-    icon: "mdi:timer"
+    class: duration
     category: diagnostic
     dps:
       - id: 9

+ 0 - 5
custom_components/tuya_local/devices/neatsvor_x600_vacuum.yaml

@@ -144,7 +144,6 @@ secondary_entities:
     name: Cleaning time
     category: diagnostic
     class: duration
-    icon: "mdi:timer-star"
     dps:
       - id: 6
         name: sensor
@@ -187,7 +186,6 @@ secondary_entities:
     name: Side brush life
     category: diagnostic
     class: duration
-    icon: "mdi:timer-sand"
     dps:
       - id: 17
         name: sensor
@@ -209,7 +207,6 @@ secondary_entities:
     name: Main brush life
     category: diagnostic
     class: duration
-    icon: "mdi:timer-sand"
     dps:
       - id: 19
         name: sensor
@@ -231,7 +228,6 @@ secondary_entities:
     name: Filter life
     category: diagnostic
     class: duration
-    icon: "mdi:timer-sand"
     dps:
       - id: 21
         name: sensor
@@ -253,7 +249,6 @@ secondary_entities:
     name: Mop life
     category: diagnostic
     class: duration
-    icon: "mdi:timer-sand"
     dps:
       - id: 23
         name: sensor

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

@@ -89,7 +89,7 @@ secondary_entities:
   - entity: number
     name: "On timer"
     category: config
-    icon: "mdi:timer"
+    translation_key: timer
     dps:
       - id: 104
         type: integer
@@ -104,7 +104,7 @@ secondary_entities:
   - entity: number
     name: "Off timer"
     category: config
-    icon: "mdi:timer"
+    translation_key: timer
     dps:
       - id: 105
         type: integer

+ 0 - 5
custom_components/tuya_local/devices/proscenic_m9_vacuum.yaml

@@ -189,7 +189,6 @@ secondary_entities:
     name: Cleaning time
     category: diagnostic
     class: duration
-    icon: "mdi:timer-star"
     dps:
       - id: 6
         name: sensor
@@ -249,7 +248,6 @@ secondary_entities:
     name: Side brush life
     category: diagnostic
     class: duration
-    icon: "mdi:timer-sand"
     dps:
       - id: 17
         name: sensor
@@ -271,7 +269,6 @@ secondary_entities:
     name: Main brush life
     category: diagnostic
     class: duration
-    icon: "mdi:timer-sand"
     dps:
       - id: 19
         name: sensor
@@ -293,7 +290,6 @@ secondary_entities:
     name: Filter life
     category: diagnostic
     class: duration
-    icon: "mdi:timer-sand"
     dps:
       - id: 21
         name: sensor
@@ -315,7 +311,6 @@ secondary_entities:
     name: Mop life
     category: diagnostic
     class: duration
-    icon: "mdi:timer-sand"
     dps:
       - id: 23
         name: sensor

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

@@ -80,7 +80,7 @@ secondary_entities:
   - entity: number
     category: config
     name: USB timer
-    icon: "mdi:timer"
+    translation_key: timer
     dps:
       - id: 15
         name: value

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

@@ -76,7 +76,7 @@ secondary_entities:
         name: button
   - entity: select
     name: "On timer"
-    icon: "mdi:timer"
+    translation_key: timer
     category: config
     dps:
       - id: 16
@@ -146,7 +146,7 @@ secondary_entities:
         hidden: true
   - entity: select
     name: "Off timer"
-    icon: "mdi:timer"
+    translation_key: timer
     category: config
     dps:
       - id: 101

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

@@ -23,7 +23,7 @@ secondary_entities:
   - entity: number
     name: Countdown
     category: config
-    icon: "mdi:timer"
+    translation_key: timer
     mode: box
     dps:
       - id: 7

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

@@ -70,15 +70,12 @@ secondary_entities:
           max: 60
   - entity: sensor
     name: "Run time remaining"
-    icon: "mdi:timer-sand"
+    class: duration
     dps:
       - id: 102
         type: integer
         name: sensor
         unit: s
-        range:
-          min: 0
-          max: 360
       - id: 10
         type: integer
         name: runtime

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

@@ -190,7 +190,7 @@ secondary_entities:
         name: switch
   - entity: select
     name: Auto-off A
-    icon: "mdi:timer"
+    translation_key: timer
     category: config
     dps:
       - id: 26
@@ -240,7 +240,7 @@ secondary_entities:
             value: "10h"
   - entity: select
     name: Auto-off B
-    icon: "mdi:timer"
+    translation_key: timer
     category: config
     dps:
       - id: 27

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

@@ -192,7 +192,7 @@ secondary_entities:
           - value: true
   - entity: switch
     name: "On timer"
-    icon: "mdi:timer"
+    translation_key: timer
     category: config
     dps:
       - id: 109
@@ -200,7 +200,7 @@ secondary_entities:
         name: switch
   - entity: switch
     name: "Off timer"
-    icon: "mdi:timer"
+    translation_key: timer
     category: config
     dps:
       - id: 110

+ 1 - 1
custom_components/tuya_local/devices/tontine_039-WIFI_blanket.yaml

@@ -40,7 +40,7 @@ secondary_entities:
   - entity: sensor
     name: Countdown
     class: duration
-    icon: "mdi:timer"
+    translation_key: timer
     dps:
       - id: 10
         name: sensor

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

@@ -174,7 +174,7 @@ secondary_entities:
         name: switch
   - entity: switch
     name: Timer on
-    icon: "mdi:timer"
+    translation_key: timer
     category: config
     dps:
       - id: 101
@@ -182,7 +182,7 @@ secondary_entities:
         name: switch
   - entity: switch
     name: Timer off
-    icon: "mdi:timer"
+    translation_key: timer
     category: config
     dps:
       - id: 102

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

@@ -23,7 +23,7 @@ secondary_entities:
   - entity: number
     name: Fan timer
     category: config
-    icon: "mdi:timer"
+    translation_key: timer
     dps:
       - id: 2
         type: integer

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

@@ -192,7 +192,7 @@ secondary_entities:
   - entity: switch
     name: Tick down
     category: config
-    icon: "mdi:timer"
+    icon: "mdi:metronome"
     dps:
       - id: 29
         type: boolean