Introduce unit enums for irradiance (#83414)
This commit is contained in:
parent
0eacd84ff3
commit
90438edc17
2 changed files with 20 additions and 8 deletions
|
@ -26,8 +26,8 @@ from homeassistant.components.recorder.models import (
|
|||
from homeassistant.const import (
|
||||
ATTR_UNIT_OF_MEASUREMENT,
|
||||
REVOLUTIONS_PER_MINUTE,
|
||||
VOLUME_CUBIC_FEET,
|
||||
VOLUME_CUBIC_METERS,
|
||||
UnitOfIrradiance,
|
||||
UnitOfVolume,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant, State, callback, split_entity_id
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
|
@ -54,9 +54,10 @@ DEFAULT_STATISTICS = {
|
|||
}
|
||||
|
||||
EQUIVALENT_UNITS = {
|
||||
"BTU/(h×ft²)": UnitOfIrradiance.BTUS_PER_HOUR_SQUARE_FOOT,
|
||||
"RPM": REVOLUTIONS_PER_MINUTE,
|
||||
"ft3": VOLUME_CUBIC_FEET,
|
||||
"m3": VOLUME_CUBIC_METERS,
|
||||
"ft3": UnitOfVolume.CUBIC_FEET,
|
||||
"m3": UnitOfVolume.CUBIC_METERS,
|
||||
}
|
||||
|
||||
# Keep track of entities for which a warning about decreasing value has been logged
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue