Explorar o código

fix(devices): add missing sensor units

- HA 2026.8 has become more strict about unit and class matching. Some
  previous devices were added with units missing, or the unit dp given
  the wrong name.

Issue #5948 (though the exact behaviour reported there is not among
these changes and seems to be from using an obsolete version)
Jason Rumney hai 1 semana
pai
achega
b865494694

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

@@ -121,6 +121,7 @@ entities:
         type: string
         type: string
         name: sensor
         name: sensor
         optional: true
         optional: true
+        unit: "%"
         mapping:
         mapping:
           - dps_val: high
           - dps_val: high
             value: 80
             value: 80

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

@@ -316,6 +316,7 @@ entities:
         name: sensor
         name: sensor
         optional: true
         optional: true
         class: measurement
         class: measurement
+        unit: kWh
   - entity: switch
   - entity: switch
     icon: "mdi:ev-station"
     icon: "mdi:ev-station"
     dps:
     dps:

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

@@ -308,6 +308,7 @@ entities:
         name: sensor
         name: sensor
         type: integer
         type: integer
         class: measurement
         class: measurement
+        unit: ugm3
         optional: true
         optional: true
       - id: 110
       - id: 110
         type: bitfield
         type: bitfield

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

@@ -153,6 +153,7 @@ entities:
         type: integer
         type: integer
         name: sensor
         name: sensor
         class: measurement
         class: measurement
+        unit: W
   - entity: sensor
   - entity: sensor
     translation_key: time_remaining
     translation_key: time_remaining
     class: duration
     class: duration

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

@@ -29,6 +29,7 @@ entities:
       - id: 104
       - id: 104
         name: sensor
         name: sensor
         type: integer
         type: integer
+        unit: "%"
   - entity: binary_sensor
   - entity: binary_sensor
     name: Door open
     name: Door open
     class: garage_door
     class: garage_door

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

@@ -38,6 +38,7 @@ entities:
       - id: 145
       - id: 145
         type: integer
         type: integer
         name: sensor
         name: sensor
+        unit: "%"
 
 
   - entity: binary_sensor
   - entity: binary_sensor
     class: battery_charging
     class: battery_charging

+ 7 - 7
custom_components/tuya_local/devices/powerworld_pw58330_waterheater.yaml

@@ -154,7 +154,7 @@ entities:
         class: measurement
         class: measurement
       - id: 6
       - id: 6
         type: string
         type: string
-        name: temperature_unit
+        name: unit
         mapping:
         mapping:
           - dps_val: f
           - dps_val: f
             value: F
             value: F
@@ -170,7 +170,7 @@ entities:
         class: measurement
         class: measurement
       - id: 6
       - id: 6
         type: string
         type: string
-        name: temperature_unit
+        name: unit
         mapping:
         mapping:
           - dps_val: f
           - dps_val: f
             value: F
             value: F
@@ -186,7 +186,7 @@ entities:
         class: measurement
         class: measurement
       - id: 6
       - id: 6
         type: string
         type: string
-        name: temperature_unit
+        name: unit
         mapping:
         mapping:
           - dps_val: f
           - dps_val: f
             value: F
             value: F
@@ -202,7 +202,7 @@ entities:
         class: measurement
         class: measurement
       - id: 6
       - id: 6
         type: string
         type: string
-        name: temperature_unit
+        name: unit
         mapping:
         mapping:
           - dps_val: f
           - dps_val: f
             value: F
             value: F
@@ -218,7 +218,7 @@ entities:
         class: measurement
         class: measurement
       - id: 6
       - id: 6
         type: string
         type: string
-        name: temperature_unit
+        name: unit
         mapping:
         mapping:
           - dps_val: f
           - dps_val: f
             value: F
             value: F
@@ -234,7 +234,7 @@ entities:
         class: measurement
         class: measurement
       - id: 6
       - id: 6
         type: string
         type: string
-        name: temperature_unit
+        name: unit
         mapping:
         mapping:
           - dps_val: f
           - dps_val: f
             value: F
             value: F
@@ -278,7 +278,7 @@ entities:
         class: measurement
         class: measurement
       - id: 6
       - id: 6
         type: string
         type: string
-        name: temperature_unit
+        name: unit
         mapping:
         mapping:
           - dps_val: f
           - dps_val: f
             value: F
             value: F