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

Add icons to secondary entities where the default is not very depictive.

Fix unit test for Minco thermostat after renaming.
Jason Rumney 4 лет назад
Родитель
Сommit
f5e12c54c0
31 измененных файлов с 60 добавлено и 7 удалено
  1. 1 0
      custom_components/tuya_local/devices/anko_fan.yaml
  2. 1 0
      custom_components/tuya_local/devices/arlec_fan.yaml
  3. 3 0
      custom_components/tuya_local/devices/awow_th213_thermostat.yaml
  4. 3 0
      custom_components/tuya_local/devices/eanons_humidifier.yaml
  5. 1 0
      custom_components/tuya_local/devices/eberg_qubo_q40hd_heatpump.yaml
  6. 1 1
      custom_components/tuya_local/devices/electriq_desd9lw_dehumidifier.yaml
  7. 1 0
      custom_components/tuya_local/devices/gardenpac_heatpump.yaml
  8. 2 0
      custom_components/tuya_local/devices/goldair_dehumidifier.yaml
  9. 1 0
      custom_components/tuya_local/devices/goldair_geco_heater.yaml
  10. 1 0
      custom_components/tuya_local/devices/goldair_gpcv_heater.yaml
  11. 2 0
      custom_components/tuya_local/devices/goldair_gpph_heater.yaml
  12. 3 0
      custom_components/tuya_local/devices/grid_connect_usb_double_power_point.yaml
  13. 5 0
      custom_components/tuya_local/devices/inkbird_itc306a_thermostat.yaml
  14. 1 0
      custom_components/tuya_local/devices/kogan_kahtp_heater.yaml
  15. 2 0
      custom_components/tuya_local/devices/kogan_kashmfp20ba_heater.yaml
  16. 1 0
      custom_components/tuya_local/devices/kogan_kawfhtp_heater.yaml
  17. 1 0
      custom_components/tuya_local/devices/lexy_f501_fan.yaml
  18. 1 0
      custom_components/tuya_local/devices/madimack_heatpump.yaml
  19. 3 2
      custom_components/tuya_local/devices/minco_mh1823d_thermostat.yaml
  20. 1 0
      custom_components/tuya_local/devices/purline_m100_heater.yaml
  21. 4 0
      custom_components/tuya_local/devices/qoto_03_sprinkler.yaml
  22. 4 0
      custom_components/tuya_local/devices/renpho_rp_ap001s.yaml
  23. 6 0
      custom_components/tuya_local/devices/saswell_c16_thermostat.yaml
  24. 2 0
      custom_components/tuya_local/devices/saswell_t29utk_thermostat.yaml
  25. 1 0
      custom_components/tuya_local/devices/smartplugv1.yaml
  26. 1 0
      custom_components/tuya_local/devices/smartplugv2.yaml
  27. 2 1
      custom_components/tuya_local/devices/stirling_fs140dc_fan.yaml
  28. 2 0
      custom_components/tuya_local/devices/wetair_wch750_heater.yaml
  29. 1 1
      custom_components/tuya_local/manifest.json
  30. 1 1
      tests/devices/test_electriq_desd9lw_dehumidifier.py
  31. 1 1
      tests/devices/test_minco_mh1823d_thermostat.py

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

@@ -37,6 +37,7 @@ primary_entity:
 secondary_entities:
   - entity: number
     name: Timer
+    icon: "mdi:timer"
     category: config
     dps:
       - id: 6

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

@@ -32,6 +32,7 @@ primary_entity:
 secondary_entities:
   - entity: select
     name: timer
+    icon: "mdi:timer"
     category: config
     dps:
       - id: 103

+ 3 - 0
custom_components/tuya_local/devices/awow_th213_thermostat.yaml

@@ -114,6 +114,7 @@ secondary_entities:
         readonly: true
   - entity: select
     name: Temperature Sensor
+    icon: "mdi:thermometer"
     category: config
     dps:
       - id: 102
@@ -129,6 +130,7 @@ secondary_entities:
   - entity: number
     name: Calibration Offset
     category: config
+    icon: "mdi:arrow-collapse-up"
     dps:
       - id: 103
         type: integer
@@ -139,6 +141,7 @@ secondary_entities:
   - entity: number
     name: Calibration Swing
     category: config
+    icon: "mdi:arrow-expand-vertical"
     dps:
       - id: 104
         type: integer

+ 3 - 0
custom_components/tuya_local/devices/eanons_humidifier.yaml

@@ -119,12 +119,14 @@ secondary_entities:
         type: integer
   - entity: switch
     name: "UV Sterilization"
+    icon: "mdi:solar-power"
     dps:
       - id: 22
         name: switch
         type: boolean
   - entity: select
     name: Timer
+    icon: "mdi:timer"
     category: config
     dps:
       - id: 3
@@ -159,6 +161,7 @@ secondary_entities:
             value: "12 hours"
   - entity: sensor
     name: Timer
+    icon: "mdi:timer"
     category: diagnostic
     dps:
       - id: 4

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

@@ -126,6 +126,7 @@ primary_entity:
 secondary_entities:
   - entity: number
     name: Timer
+    icon: "mdi:timer"
     category: config
     dps:
       - id: 22

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

@@ -114,7 +114,7 @@ secondary_entities:
         type: boolean
   - entity: switch
     name: "Ionizer"
-    icon: "mdi:atom-variant"
+    icon: "mdi:creation"
     dps:
       - id: 12
         name: switch

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

@@ -79,6 +79,7 @@ secondary_entities:
   - entity: sensor
     name: Power Level
     class: power_factor
+    icon: "mdi:signal"
     category: diagnostic
     dps:
       - id: 104

+ 2 - 0
custom_components/tuya_local/devices/goldair_dehumidifier.yaml

@@ -284,6 +284,7 @@ secondary_entities:
   - entity: binary_sensor
     name: defrost
     class: cold
+    icon: "mdi:snowflake"
     category: diagnostic
     dps:
       - id: 105
@@ -291,6 +292,7 @@ secondary_entities:
         name: sensor
   - entity: number
     name: timer
+    icon: "msi:timer"
     category: config
     dps:
       - id: 12

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

@@ -49,6 +49,7 @@ secondary_entities:
   - entity: number
     name: Timer
     category: config
+    icon: "mdi:timer"
     dps:
       - id: 5
         type: integer

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

@@ -56,6 +56,7 @@ secondary_entities:
             icon: "mdi:hand-back-right"
   - entity: number
     name: Timer
+    icon: "mdi:timer"
     category: config
     dps:
       - id: 5

+ 2 - 0
custom_components/tuya_local/devices/goldair_gpph_heater.yaml

@@ -145,6 +145,7 @@ secondary_entities:
             icon: "mdi:hand-back-right"
   - entity: number
     name: Timer
+    icon: "mdi:timer"
     category: config
     dps:
       - id: 102
@@ -158,6 +159,7 @@ secondary_entities:
   - entity: sensor
     name: Power Level
     class: power_factor
+    icon: "mdi:signal"
     category: diagnostic
     dps:
       - id: 101

+ 3 - 0
custom_components/tuya_local/devices/grid_connect_usb_double_power_point.yaml

@@ -150,6 +150,7 @@ secondary_entities:
   - entity: select
     category: config
     name: Initial State
+    icon: "mdi:toggle-switch"
     dps:
       - id: 38
         name: option
@@ -163,6 +164,7 @@ secondary_entities:
             value: "Last State"
   - entity: number
     name: Timer 1
+    icon: "mdi:timer"
     category: config
     dps:
       - id: 9
@@ -173,6 +175,7 @@ secondary_entities:
           max: 86400
   - entity: number
     name: Timer 2
+    icon: "mdi:timer"
     category: config
     dps:
       - id: 10

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

@@ -127,6 +127,7 @@ secondary_entities:
   - entity: number
     category: config
     name: Calibration Offset
+    icon: "mdi:arrow-collapse-up"
     dps:
       - id: 102
         name: value
@@ -148,6 +149,7 @@ secondary_entities:
         hidden: true
   - entity: number
     name: Continuous Heat Hours
+    icon: "mdi:clock"
     category: config
     dps:
       - id: 108
@@ -159,6 +161,7 @@ secondary_entities:
   - entity: number
     name: High Temperature Limit
     category: config
+    icon: "mdi:thermometer-alert"
     dps:
       - id: 109
         name: value
@@ -180,6 +183,7 @@ secondary_entities:
         hidden: true
   - entity: number
     name: Low Temperature Limit
+    icon: "mdi:snowflake-alert"
     category: config
     dps:
       - id: 110
@@ -203,6 +207,7 @@ secondary_entities:
   - entity: select
     category: config
     name: Temperature Unit
+    icon: "mdi:temperature-celsius"
     dps:
       - id: 101
         name: option

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

@@ -49,6 +49,7 @@ secondary_entities:
             icon: "mdi:hand-back-right"
   - entity: number
     name: Timer
+    icon: "mdi:timer"
     category: config
     dps:
       - id: 8

+ 2 - 0
custom_components/tuya_local/devices/kogan_kashmfp20ba_heater.yaml

@@ -35,6 +35,7 @@ primary_entity:
 secondary_entities:
   - entity: light
     name: "Backlight"
+    icon: "mdi:television-ambient-light"
     dps:
       - id: 5
         type: string
@@ -54,6 +55,7 @@ secondary_entities:
             value: "blueorange"
   - entity: light
     name: "Flame"
+    icon: "mdi:fireplace"
     dps:
       - id: 6
         type: string

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

@@ -48,6 +48,7 @@ secondary_entities:
             icon: "mdi:hand-back-right"
   - entity: number
     name: Timer
+    icon: "mdi:timer"
     category: config
     dps:
       - id: 5

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

@@ -84,6 +84,7 @@ secondary_entities:
             icon: "mdi:volume-mute"
   - entity: number
     name: Timer
+    icon: "mdi:timer"
     category: config
     dps:
       - id: 6

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

@@ -124,6 +124,7 @@ secondary_entities:
   - entity: sensor
     category: disagnostic
     name: Power Level
+    icon: "mdi:signal"
     class: power_factor
     dps:
       - id: 104

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

@@ -124,6 +124,7 @@ secondary_entities:
             value: External
   - entity: select
     name: Temperature Unit
+    icon: "mdi:temperature-celsius"
     category: config
     dps:
       - id: 19
@@ -139,7 +140,7 @@ secondary_entities:
   - entity: number
     name: Calibration Offset Internal
     category: config
-    icon: "mdi: arrow-collapse-up"
+    icon: "mdi:arrow-collapse-up"
     dps:
       - id: 35
         type: integer
@@ -157,7 +158,7 @@ secondary_entities:
   - entity: number
     name: Calibration Offset External
     category: config
-    icon: "mdi: arrow-collapse-up"
+    icon: "mdi:arrow-collapse-up"
     dps:
       - id: 103
         type: integer

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

@@ -81,6 +81,7 @@ secondary_entities:
   - entity: switch
     name: "Open Window Detector"
     category: config
+    icon: "mdi:window-open"
     class: switch
     dps:
       - id: 101

+ 4 - 0
custom_components/tuya_local/devices/qoto_03_sprinkler.yaml

@@ -1,6 +1,7 @@
 name: QOTO 03 Sprinkler Controller
 primary_entity:
   entity: number
+  icon: "mdi:pipe-valve"
   dps:
     - id: 102
       type: integer
@@ -13,6 +14,7 @@ primary_entity:
 secondary_entities:
   - entity: sensor
     category: diagnostic
+    icon: "mdi:valve"
     name: Open
     dps:
       - id: 103
@@ -22,6 +24,7 @@ secondary_entities:
   - entity: sensor
     category: diagnostic
     name: Timer
+    icon: "mdi:timer"
     dps:
       - id: 104
         name: sensor
@@ -30,6 +33,7 @@ secondary_entities:
   - entity: number
     category: config
     name: Timer
+    icon: "mdi:timer"
     dps:
       - id: 105
         type: integer

+ 4 - 0
custom_components/tuya_local/devices/renpho_rp_ap001s.yaml

@@ -83,6 +83,7 @@ secondary_entities:
   - entity: sensor
     name: Prefilter Life
     category: diagnostic
+    icon: "mdi:air-filter"
     dps:
       - id: 102
         type: integer
@@ -90,6 +91,7 @@ secondary_entities:
   - entity: sensor
     name: Charcoal Filter Life
     category: diagnostic
+    icon: "mdi:air-filter"
     dps:
       - id: 103
         type: integer
@@ -97,6 +99,7 @@ secondary_entities:
   - entity: sensor
     name: Active Filter Life
     category: diagnostic
+    icon: "mdi:air-filter"
     dps:
       - id: 104
         type: integer
@@ -104,6 +107,7 @@ secondary_entities:
   - entity: sensor
     name: HEPA Filter Life
     category: diagnostic
+    icon: "mdi:air-filter"
     dps:
       - id: 105
         type: integer

+ 6 - 0
custom_components/tuya_local/devices/saswell_c16_thermostat.yaml

@@ -114,6 +114,7 @@ secondary_entities:
   - entity: number
     name: Floor Temperature Limit
     category: config
+    icon: "mdi:thermometer-alert"
     dps:
       - id: 6
         name: value
@@ -134,8 +135,10 @@ secondary_entities:
         mapping:
           - dps_val: true
             value: Office
+            icon: "mdi:office-building-marker"
           - dps_val: false
             value: Home
+            icon: "mdi:home-map-marker"
   - entity: sensor
     name: Floor Temperature
     class: temperature
@@ -150,6 +153,7 @@ secondary_entities:
           - scale: 10
   - entity: switch
     name: Adaptive
+    icon: "mdi:school"
     category: config
     dps:
       - id: 10
@@ -157,6 +161,7 @@ secondary_entities:
         type: boolean
   - entity: select
     name: Schedule
+    icon: "mdi:calendar-clock"
     category: config
     dps:
       - id: 12
@@ -170,6 +175,7 @@ secondary_entities:
   - entity: number
     name: Power Rating
     category: config
+    icon: "mdi:signal"
     dps:
       - id: 22
         name: value

+ 2 - 0
custom_components/tuya_local/devices/saswell_t29utk_thermostat.yaml

@@ -128,6 +128,7 @@ primary_entity:
 secondary_entities:
   - entity: select
     name: Temperature Unit
+    icon: "mdi:temperature-celsius"
     category: config
     dps:
       - id: 19
@@ -140,6 +141,7 @@ secondary_entities:
             value: Celsius
   - entity: select
     name: Configuration
+    icon: "mdi:tune"
     category: config
     dps:
       - id: 112

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

@@ -65,6 +65,7 @@ secondary_entities:
           - scale: 10
   - entity: number
     category: config
+    icon: "mdi:timer"
     name: Timer
     dps:
       - id: 2

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

@@ -66,6 +66,7 @@ secondary_entities:
   - entity: number
     category: config
     name: Timer
+    icon: "mdi:timer"
     dps:
       - id: 9
         type: integer

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

@@ -28,7 +28,8 @@ primary_entity:
       type: boolean
 secondary_entities:
   - entity: select
-    name: timer
+    name: Timer
+    icon: "mdi:timer"
     category: config
     dps:
       - id: 22

+ 2 - 0
custom_components/tuya_local/devices/wetair_wch750_heater.yaml

@@ -85,6 +85,7 @@ secondary_entities:
           - step: 85
   - entity: select
     name: Timer
+    icon: "mdi:timer"
     category: config
     dps:
       - id: 19
@@ -144,6 +145,7 @@ secondary_entities:
   - entity: sensor
     category: diagnostic
     name: Timer
+    icon: "mdi:timer"
     dps:
       - id: 20
         type: integer

+ 1 - 1
custom_components/tuya_local/manifest.json

@@ -2,7 +2,7 @@
     "domain": "tuya_local",
     "iot_class": "local_polling",
     "name": "Tuya Local",
-    "version": "0.13.2",
+    "version": "0.13.3",
     "documentation": "https://github.com/make-all/tuya-local",
     "issue_tracker": "https://github.com/make-all/tuya-local/issues",
     "dependencies": [],

+ 1 - 1
tests/devices/test_electriq_desd9lw_dehumidifier.py

@@ -306,4 +306,4 @@ class TestElectriqDESD9LWDehumidifier(
         self.assertEqual(self.basicLight.icon, "mdi:solar-power")
 
     def test_switch_icon(self):
-        self.assertEqual(self.basicSwitch.icon, "mdi:atom-variant")
+        self.assertEqual(self.basicSwitch.icon, "mdi:creation")

+ 1 - 1
tests/devices/test_minco_mh1823d_thermostat.py

@@ -106,7 +106,7 @@ class TestMincoMH1823DThermostat(
         self.setUpMultiSelect(
             [
                 {
-                    "name": "select_sensor",
+                    "name": "select_temperature_sensor",
                     "dps": SELECT_DPS,
                     "options": {
                         "in": "Internal",