Add sensor device classes for apparent and reactive power (#10942)

This commit is contained in:
Erik Montnemery 2022-01-11 17:53:24 +01:00 committed by GitHub
parent 77fe687ec2
commit a7b8382617
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -112,6 +112,7 @@ export const FIXED_DOMAIN_ICONS = {
};
export const FIXED_DEVICE_CLASS_ICONS = {
apparent_power: mdiFlash,
aqi: mdiAirFilter,
// battery: mdiBattery, => not included by design since `sensorIcon()` will dynamically determine the icon
carbon_dioxide: mdiMoleculeCo2,
@ -134,6 +135,7 @@ export const FIXED_DEVICE_CLASS_ICONS = {
power: mdiFlash,
power_factor: mdiAngleAcute,
pressure: mdiGauge,
reactive_power: mdiFlash,
signal_strength: mdiWifi,
sulphur_dioxide: mdiMolecule,
temperature: mdiThermometer,

View File

@ -54,6 +54,7 @@ const hassAttributeUtil = {
],
humidifier: ["dehumidifier", "humidifier"],
sensor: [
"apparent_power",
"aqi",
"battery",
"carbon_dioxide",
@ -75,6 +76,7 @@ const hassAttributeUtil = {
"power",
"power_factor",
"pressure",
"reactive_power",
"signal_strength",
"sulphur_dioxide",
"temperature",