Show moisture/flood alerts in the Area card (#12978)

This commit is contained in:
Alessandro Ghedini 2022-06-23 01:26:32 +01:00 committed by GitHub
parent 9fa8a96d09
commit 8bd7370a02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,7 @@ import {
mdiThermometer,
mdiToggleSwitch,
mdiToggleSwitchOff,
mdiWaterAlert,
mdiWaterPercent,
} from "@mdi/js";
import type { HassEntity, UnsubscribeFunc } from "home-assistant-js-websocket";
@ -63,7 +64,7 @@ const OTHER_DOMAINS = ["camera"];
const DEVICE_CLASSES = {
sensor: ["temperature", "humidity"],
binary_sensor: ["motion"],
binary_sensor: ["motion", "moisture"],
};
const DOMAIN_ICONS = {
@ -76,6 +77,7 @@ const DOMAIN_ICONS = {
},
binary_sensor: {
motion: mdiRun,
moisture: mdiWaterAlert,
},
};