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

View File

@ -124,6 +124,7 @@ const OVERRIDE_SENSOR_UNITS = {
volume: ["fl. oz.", "ft³", "gal", "L", "mL", "m³"],
water: ["ft³", "gal", "L", "m³"],
weight: ["g", "kg", "lb", "mg", "oz", "µg"],
wind_speed: ["ft/s", "km/h", "kn", "mph", "m/s"],
};
const OVERRIDE_WEATHER_UNITS = {
@ -131,7 +132,7 @@ const OVERRIDE_WEATHER_UNITS = {
pressure: ["hPa", "mbar", "mmHg", "inHg"],
temperature: ["°C", "°F"],
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"];