sensor: added radiation dose sensor type and units
parent
16fc935c87
commit
28736a7da7
|
@ -30,6 +30,7 @@ from homeassistant.const import (
|
|||
UnitOfPower,
|
||||
UnitOfPrecipitationDepth,
|
||||
UnitOfPressure,
|
||||
UnitOfRadiationDose,
|
||||
UnitOfSoundPressure,
|
||||
UnitOfSpeed,
|
||||
UnitOfTemperature,
|
||||
|
@ -320,6 +321,18 @@ class SensorDeviceClass(StrEnum):
|
|||
- `psi`
|
||||
"""
|
||||
|
||||
RADIATION_DOSE = "radiation_dose"
|
||||
"""Radiation dose.
|
||||
|
||||
Unit of measurement: `Sv`, `mSv`, `μSv`, `nSv`
|
||||
"""
|
||||
|
||||
RADIATION_DOSE_RATE = "radiation_dose_rate"
|
||||
"""Radiation dose rate.
|
||||
|
||||
Unit of measurement: `Sv/h`, `mSv/h`, `μSv/h`, `nSv/h`
|
||||
"""
|
||||
|
||||
REACTIVE_POWER = "reactive_power"
|
||||
"""Reactive power.
|
||||
|
||||
|
|
|
@ -105,6 +105,12 @@
|
|||
"pressure": {
|
||||
"default": "mdi:gauge"
|
||||
},
|
||||
"radiation_dose": {
|
||||
"default": "mdi:radioactive"
|
||||
},
|
||||
"radiation_dose_rate": {
|
||||
"default": "mdi:radioactive"
|
||||
},
|
||||
"reactive_power": {
|
||||
"default": "mdi:flash"
|
||||
},
|
||||
|
|
|
@ -978,6 +978,26 @@ _DEPRECATED_PRESSURE_PSI: Final = DeprecatedConstantEnum(
|
|||
"""Deprecated: please use UnitOfPressure.PSI"""
|
||||
|
||||
|
||||
# Radiation dose units
|
||||
class UnitOfRadiationDose(StrEnum):
|
||||
"""Radiation dose units."""
|
||||
|
||||
SV = "Sv"
|
||||
MSV = "mSv"
|
||||
USV = "μSv"
|
||||
NSV = "nSv"
|
||||
|
||||
|
||||
# Radiation dose rate units
|
||||
class UnitOfRadiationDoseRate(StrEnum):
|
||||
"""Radiation dose rate units."""
|
||||
|
||||
SV = "Sv/h"
|
||||
MSV = "mSv/h"
|
||||
USV = "μSv/h"
|
||||
NSV = "nSv/h"
|
||||
|
||||
|
||||
# Sound pressure units
|
||||
class UnitOfSoundPressure(StrEnum):
|
||||
"""Sound pressure units."""
|
||||
|
|
Loading…
Reference in New Issue