mirror of
https://github.com/home-assistant/core.git
synced 2025-11-08 18:39:30 +00:00
Fix _is_valid_suggested_unit in sensor platform (#151912)
This commit is contained in:
@@ -32,6 +32,7 @@ from homeassistant.components.sensor.const import STATE_CLASS_UNITS, UNIT_CONVER
|
||||
from homeassistant.config_entries import ConfigEntry, ConfigFlow
|
||||
from homeassistant.const import (
|
||||
ATTR_UNIT_OF_MEASUREMENT,
|
||||
CONCENTRATION_PARTS_PER_MILLION,
|
||||
PERCENTAGE,
|
||||
STATE_UNKNOWN,
|
||||
EntityCategory,
|
||||
@@ -2938,6 +2939,13 @@ async def test_suggested_unit_guard_invalid_unit(
|
||||
UnitOfDataRate.BITS_PER_SECOND,
|
||||
10000,
|
||||
),
|
||||
(
|
||||
SensorDeviceClass.CO2,
|
||||
CONCENTRATION_PARTS_PER_MILLION,
|
||||
10,
|
||||
CONCENTRATION_PARTS_PER_MILLION,
|
||||
10,
|
||||
),
|
||||
],
|
||||
)
|
||||
async def test_suggested_unit_guard_valid_unit(
|
||||
|
||||
Reference in New Issue
Block a user