Pārlūkot izejas kodu

rework: eliminate misplaced icon_priority tags

- use translations where already defined in place of explicit icons
- move remaining icon_priority to where the icons are defined
Jason Rumney 2 mēneši atpakaļ
vecāks
revīzija
f4d31a920b

+ 2 - 11
custom_components/tuya_local/devices/fairland_iphcr15_heatpump.yaml

@@ -8,6 +8,7 @@ products:
     #   model InverterPlus
 entities:
   - entity: climate
+    translation_only_key: pool_heatpump
     dps:
       - id: 1
         name: hvac_mode
@@ -15,8 +16,6 @@ entities:
         mapping:
           - dps_val: false
             value: "off"
-            icon: "mdi:hvac-off"
-            icon_priority: 1
           - dps_val: true
             constraint: mode
             conditions:
@@ -40,14 +39,7 @@ entities:
       - id: 105
         name: mode
         type: string
-        icon_priority: 4
-        mapping:
-          - dps_val: warm
-            icon: "mdi:hot-tub"
-          - dps_val: cool
-            icon: "mdi:snowflake"
-          - dps_val: smart
-            icon: "mdi:refresh-auto"
+        hidden: true
       - id: 106
         name: temperature
         type: integer
@@ -79,7 +71,6 @@ entities:
     category: diagnostic
     name: Power level
     icon: "mdi:signal"
-    class: power_factor
     dps:
       - id: 104
         type: integer

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

@@ -17,21 +17,24 @@ entities:
       - id: 102
         type: string
         name: hvac_action
-        icon_priority: 2
         optional: true
         mapping:
           - dps_val: stop
             value: "off"
             icon: "mdi:pot-outline"
+            icon_priority: 2
           - dps_val: working
             value: heating
             icon: "mdi:pot-steam"
+            icon_priority: 2
           - dps_val: complete
             value: idle
             icon: "mdi:pot"
+            icon_priority: 2
           - dps_val: null
             value: "off"
             icon: "mdi:pot-outline"
+            icon_priority: 2
       - id: 103
         type: integer
         name: temperature

+ 24 - 1
custom_components/tuya_local/devices/moebot_s_mower.yaml

@@ -150,7 +150,6 @@ entities:
       - id: 103
         name: sensor
         type: string
-        icon_priority: 1
         optional: true
         persist: false
         mapping:
@@ -159,75 +158,99 @@ entities:
           - dps_val: MOWER_LEAN
             value: Tilted
             icon: "mdi:angle-acute"
+            icon_priority: 1
           - dps_val: MOWER_STEEP
             value: Steep
             icon: "mdi:slope-uphill"
+            icon_priority: 1
           - dps_val: RAIN_PARK
             value: Raining
             icon: "mdi:weather-pouring"
+            icon_priority: 1
           - dps_val: BATTERY_NOT_ENOUGH
             value: Low battery
             icon: "mdi:battery-low"
+            icon_priority: 1
           - dps_val: NO_LOOP_SIGNAL
             value: Weak signal
             icon: "mdi:signal-cellular-1"
+            icon_priority: 1
           - dps_val: CLOSE_TOPCOVER
             value: Close top cover
             icon: "mdi:door-open"
+            icon_priority: 1
           - dps_val: MOWER_IN_STATION
             value: Docked
             icon: "mdi:mower"
+            icon_priority: 1
           - dps_val: MOWER_OUT_STATION
             value: Undocked
             icon: "mdi:mower-on"
+            icon_priority: 1
           - dps_val: PLACE_INSIDE_STATION
             value: Manually dock
             icon: "mdi:home-alert"
+            icon_priority: 1
           - dps_val: FIXED_END
             value: Finished fixed mowing
             icon: "mdi:mower"
+            icon_priority: 1
           - dps_val: CHARGING_DISCONNECT
             value: Disconnected
             icon: "mdi:power-plug-battery"
+            icon_priority: 1
           - dps_val: CHARGING_PAUSE
             value: Paused charging
             icon: "mdi:battery-clock"
+            icon_priority: 1
           - dps_val: WORK_INTERRUPT
             value: Interrupted
             icon: "mdi:alert-octogon"
+            icon_priority: 1
           - dps_val: FIXED_MOWING_INTERRUPT
             value: Interrupted fixed mowing
             icon: "mdi:alert-octogon"
+            icon_priority: 1
           - dps_val: TURN_ON_BUTTON
             value: Turn on button
             icon: "mdi:button-pointer"
+            icon_priority: 1
           - dps_val: PRESS_START_KEY
             value: Press start
             icon: "mdi:play"
+            icon_priority: 1
           - dps_val: TIMESET_30MIN
             value: Set 30 minute timer
             icon: "mdi:fast-forward-30"
+            icon_priority: 1
           - dps_val: TIMESET_UNLEGAL
             value: Invalid timer
             icon: "mdi:timer-alert"
+            icon_priority: 1
           - dps_val: CHARGR_CURRENT_LOW
             value: Charging current low
             icon: "mdi:flash-alert"
+            icon_priority: 1
           - dps_val: RAIN_OUT_STATION
             value: Caught in rain
             icon: "mdi:weather-pouring"
+            icon_priority: 1
           - dps_val: UPDATA_FAIL
             value: Data upload failure
             icon: "mdi:cloud-alert"
+            icon_priority: 1
           - dps_val: CONTINUE_TOOLTIP
             value: Continue
             icon: "mdi:step-forward"
+            icon_priority: 1
           - dps_val: MOWER_EMERGENCY
             value: Stopped
             icon: "mdi:octagon"
+            icon_priority: 1
           - dps_val: MOWER_UI_LOCKED
             value: UI locked
             icon: "mdi:hand-back-right-off"
+            icon_priority: 1
   - entity: switch
     name: Rain mode
     icon: "mdi:weather-pouring"

+ 1 - 10
custom_components/tuya_local/devices/poolex_qline_heatpump.yaml

@@ -2,6 +2,7 @@ name: Pool heat pump
 # products: Poolex Q-Line
 entities:
   - entity: climate
+    translation_only_key: pool_heatpump
     dps:
       - id: 1
         name: hvac_mode
@@ -9,8 +10,6 @@ entities:
         mapping:
           - dps_val: false
             value: "off"
-            icon: "mdi:hvac-off"
-            icon_priority: 1
           - dps_val: true
             constraint: heating_mode
             conditions:
@@ -24,14 +23,6 @@ entities:
         name: heating_mode
         hidden: true
         type: string
-        icon_priority: 3
-        mapping:
-          - dps_val: heating
-            icon: "mdi:hot-tub"
-          - dps_val: cold
-            icon: "mdi:snowflake"
-          - dps_val: mute
-            icon: "mdi:hot-tub"
       - id: 4
         name: temperature
         type: integer