Use icons in add trigger/condition/action menus (#13452)

This commit is contained in:
Franck Nijhof
2022-08-23 16:13:39 +02:00
committed by GitHub
parent f5b44656cf
commit 8d18fb79fb
8 changed files with 162 additions and 100 deletions

View File

@@ -1,19 +1,35 @@
import type { Trigger } from "./automation";
import {
mdiAvTimer,
mdiCalendar,
mdiClockOutline,
mdiCodeBraces,
mdiDevices,
mdiExclamation,
mdiHomeAssistant,
mdiMapMarker,
mdiMapMarkerRadius,
mdiNfcVariant,
mdiNumeric,
mdiStateMachine,
mdiSwapHorizontal,
mdiWeatherSunny,
mdiWebhook,
} from "@mdi/js";
export const TRIGGER_TYPES: Trigger["platform"][] = [
"calendar",
"device",
"event",
"state",
"geo_location",
"homeassistant",
"mqtt",
"numeric_state",
"sun",
"tag",
"template",
"time",
"time_pattern",
"webhook",
"zone",
];
export const TRIGGER_TYPES = {
calendar: mdiCalendar,
device: mdiDevices,
event: mdiExclamation,
state: mdiStateMachine,
geo_location: mdiMapMarker,
homeassistant: mdiHomeAssistant,
mqtt: mdiSwapHorizontal,
numeric_state: mdiNumeric,
sun: mdiWeatherSunny,
tag: mdiNfcVariant,
template: mdiCodeBraces,
time: mdiClockOutline,
time_pattern: mdiAvTimer,
webhook: mdiWebhook,
zone: mdiMapMarkerRadius,
};