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

+2 -2
View File
@@ -62,8 +62,8 @@ export function bearing(v: unknown): number | null {
/** The weather to draw from an entity, or null when it is missing or reports nothing usable. */
export function readSkyWeather(hass: HomeAssistant, entity: string | null): SkyWeather | null {
const st = entity ? hass.states[entity] : undefined;
if (!st || st.state === "unavailable" || st.state === "unknown") return null;
const look = LOOK[st.state];
if (!st || st.state === "unavailable" || (st.state === "unknown" && !st.attributes.nf_symcon_weather)) return null;
const look = LOOK[st.state] ?? (st.attributes.nf_symcon_weather ? {} : undefined);
if (!look) return null;
const a = st.attributes as Record<string, unknown>;
const w: SkyWeather = {