File tree Expand file tree Collapse file tree 5 files changed +23
-2
lines changed
Expand file tree Collapse file tree 5 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ class NumberDeviceClass(StrEnum):
8989 APPARENT_POWER = "apparent_power"
9090 """Apparent power.
9191
92- Unit of measurement: `mVA`, `VA`
92+ Unit of measurement: `mVA`, `VA`, `kVA`
9393 """
9494
9595 AQI = "aqi"
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ class SensorDeviceClass(StrEnum):
120120 APPARENT_POWER = "apparent_power"
121121 """Apparent power.
122122
123- Unit of measurement: `mVA`, `VA`
123+ Unit of measurement: `mVA`, `VA`, `kVA`
124124 """
125125
126126 AQI = "aqi"
Original file line number Diff line number Diff line change @@ -590,6 +590,7 @@ class UnitOfApparentPower(StrEnum):
590590
591591 MILLIVOLT_AMPERE = "mVA"
592592 VOLT_AMPERE = "VA"
593+ KILO_VOLT_AMPERE = "kVA"
593594
594595
595596# Power units
Original file line number Diff line number Diff line change @@ -391,10 +391,12 @@ class ApparentPowerConverter(BaseUnitConverter):
391391 _UNIT_CONVERSION : dict [str | None , float ] = {
392392 UnitOfApparentPower .MILLIVOLT_AMPERE : 1 * 1000 ,
393393 UnitOfApparentPower .VOLT_AMPERE : 1 ,
394+ UnitOfApparentPower .KILO_VOLT_AMPERE : 1 / 1000 ,
394395 }
395396 VALID_UNITS = {
396397 UnitOfApparentPower .MILLIVOLT_AMPERE ,
397398 UnitOfApparentPower .VOLT_AMPERE ,
399+ UnitOfApparentPower .KILO_VOLT_AMPERE ,
398400 }
399401
400402
Original file line number Diff line number Diff line change 191191 0.01 ,
192192 UnitOfApparentPower .VOLT_AMPERE ,
193193 ),
194+ (
195+ 10 ,
196+ UnitOfApparentPower .MILLIVOLT_AMPERE ,
197+ 0.00001 ,
198+ UnitOfApparentPower .KILO_VOLT_AMPERE ,
199+ ),
200+ (
201+ 10 ,
202+ UnitOfApparentPower .VOLT_AMPERE ,
203+ 0.01 ,
204+ UnitOfApparentPower .KILO_VOLT_AMPERE ,
205+ ),
206+ (
207+ 10 ,
208+ UnitOfApparentPower .KILO_VOLT_AMPERE ,
209+ 10000 ,
210+ UnitOfApparentPower .VOLT_AMPERE ,
211+ ),
194212 ],
195213 AreaConverter : [
196214 # Square Meters to other units
You can’t perform that action at this time.
0 commit comments