UNPKG

@hakit/core

Version:

A collection of React hooks and helpers for Home Assistant to easily communicate with the Home Assistant WebSocket API.

54 lines (53 loc) 1.44 kB
import { computeDomain as c } from "./computeDomain.js"; import { startCase as s, lowerCase as n } from "lodash"; import { l as e } from "../../index-BfdcdUoC.js"; const l = (o, a) => { const t = c(o); switch (t) { case "plant": return e("plant_status"); case "switch": return a && a === "outlet" ? e("outlet") : e("switch"); case "alarm_control_panel": return e("alarm_panel"); case "tts": return e("text_to_speech"); case "cloud": return e("home_assistant_cloud"); case "hassio": return e("home_assistant") + " IO"; case "frontend": return e("home_assistant_frontend"); case "homeassistant": return e("home_assistant"); case "lawn_mower": return e("lawn_mower_commands"); case "rest_command": return e("restful_command"); case "persistent_notification": return e("persistent_notification"); case "binary_sensor": return e("binary_sensor"); case "datetime": return e("date_time"); case "alert": return e("alert_classes"); case "water_heater": return `${e("water")} ${e("heat")}`; case "stt": case "google": case "reolink": case "notify": case "zha": case "vacuum": return s(n(t)); default: { const r = e(t); return r === t ? s(n(t)) : r; } } }; export { l as computeDomainTitle }; //# sourceMappingURL=computeDomainTitle.js.map