Add wind_speed sensor device class (#14030)

This commit is contained in:
epenet 2022-10-26 13:27:39 +02:00 committed by GitHub
parent 66ed1b18be
commit e0a56956e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -60,6 +60,7 @@ import {
mdiWaterPercent, mdiWaterPercent,
mdiWeatherCloudy, mdiWeatherCloudy,
mdiWeatherPouring, mdiWeatherPouring,
mdiWeatherWindy,
mdiWeight, mdiWeight,
mdiWhiteBalanceSunny, mdiWhiteBalanceSunny,
mdiWifi, mdiWifi,
@ -159,6 +160,7 @@ export const FIXED_DEVICE_CLASS_ICONS = {
volume: mdiCarCoolantLevel, volume: mdiCarCoolantLevel,
water: mdiWater, water: mdiWater,
weight: mdiWeight, weight: mdiWeight,
wind_speed: mdiWeatherWindy,
}; };
/** Domains that have a state card. */ /** Domains that have a state card. */

View File

@ -124,6 +124,7 @@ const OVERRIDE_SENSOR_UNITS = {
volume: ["fl. oz.", "ft³", "gal", "L", "mL", "m³"], volume: ["fl. oz.", "ft³", "gal", "L", "mL", "m³"],
water: ["ft³", "gal", "L", "m³"], water: ["ft³", "gal", "L", "m³"],
weight: ["g", "kg", "lb", "mg", "oz", "µg"], weight: ["g", "kg", "lb", "mg", "oz", "µg"],
wind_speed: ["ft/s", "km/h", "kn", "mph", "m/s"],
}; };
const OVERRIDE_WEATHER_UNITS = { const OVERRIDE_WEATHER_UNITS = {
@ -131,7 +132,7 @@ const OVERRIDE_WEATHER_UNITS = {
pressure: ["hPa", "mbar", "mmHg", "inHg"], pressure: ["hPa", "mbar", "mmHg", "inHg"],
temperature: ["°C", "°F"], temperature: ["°C", "°F"],
visibility: ["km", "mi"], visibility: ["km", "mi"],
wind_speed: ["ft/s", "km/h", "kn", "mph", "m/s"], wind_speed: ["ft/s", "km/h", "kn", "m/s", "mph"],
}; };
const SWITCH_AS_DOMAINS = ["cover", "fan", "light", "lock", "siren"]; const SWITCH_AS_DOMAINS = ["cover", "fan", "light", "lock", "siren"];