Fix unitless converter missing valid units (#152665)

pull/152773/head
Abílio Costa 2025-09-22 15:19:31 +01:00 committed by GitHub
parent fdbff76733
commit b26b1df143
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -742,6 +742,8 @@ class UnitlessRatioConverter(BaseUnitConverter):
}
VALID_UNITS = {
None,
CONCENTRATION_PARTS_PER_BILLION,
CONCENTRATION_PARTS_PER_MILLION,
PERCENTAGE,
}

View File

@ -5201,7 +5201,7 @@ async def test_validate_statistics_unit_ignore_device_class(
BATTERY_SENSOR_ATTRIBUTES,
"%",
None,
"%, <None>",
"%, <None>, ppb, ppm",
),
],
)