feat: add native Symcon room climate, schedules, weather and presence

This commit is contained in:
jhartworks committed 2026-11-11 09:34:26 +01:00
1 parent 510aece983
commit 18e73194e0
37 files changed
+2861 -2132

No files matched your search

@@ -5,6 +5,8 @@ import { entityName, outsideEntities } from "../../../devices.ts";
import type { I18nKey } from "../../../i18n.ts";
import { BUTTON_ACTIONS, uid, type ButtonAction, type Circuit, type CustomButton, type ForecastCard, type MediaPreset, type OwnAlert, type StartView } from "../../../model.ts";
import { entityOptions, isNumeric } from "../entities.ts";
import { isSymcon } from "../../../entities/symcon-values.ts";
import { renderSymconPresence } from "../symcon-fields.ts";
import { actions, checkField, colorField, entityField, hint, iconField, selectField, textField } from "../fields.ts";
import type { EditorHost } from "../host.ts";
import { likelyRoomSensors, parseButtonData, patchPresence, startViewYaml } from "../ops/house.ts";
@@ -267,6 +269,7 @@ export function renderStartView(host: EditorHost, paneView: () => StartView | nu
/** Which room sensor says where each person is. */
export function renderPresence(host: EditorHost): TemplateResult {
if (isSymcon(host.hass)) return renderSymconPresence(host);
const linked = host.doc.presence.map((l) => l.person);
const persons = [...new Set([...Object.keys(host.hass?.states ?? {}).filter((id) => id.startsWith("person.")).sort(), ...linked])];
const numeric = entityOptions(host.hass, isNumeric);
@@ -296,6 +299,7 @@ export function renderPresence(host: EditorHost): TemplateResult {
/** Locating Bluetooth tags by room: pick a tag, walk through the rooms, record them (the element does the work). */
export function renderBleLocate(host: EditorHost, doc: unknown): TemplateResult {
if (isSymcon(host.hass)) return html``;
return html`<details class="nf-section">
<summary>${host.t("ble")}</summary>
${hint(host.t("ble_hint"))}