feat: add floating room climate cards and fix Symcon humidity selection
This commit is contained in:
1 parent
24188f96f7
commit
ff54f4461a
21 files changed
+764
-398
No files matched your search
@@ -2,7 +2,7 @@
|
||||
// everything it shows: devices and their power sensors, openings and their contacts, energy, presence, heat, weather, and so on.
|
||||
|
||||
import { alertEntities, type AlertSources } from "../../alerts.ts";
|
||||
import { carWatched, deviceSiblings, kindOf, robotRoomSensor, type FurnitureLinks, type OpeningEntities, roomEntities } from "../../devices.ts";
|
||||
import { carWatched, deviceSiblings, kindOf, robotRoomSensor, roomClimateSensors, type FurnitureLinks, type OpeningEntities, roomEntities } from "../../devices.ts";
|
||||
import { powerSensorFor } from "../../energy.ts";
|
||||
import { placedEntities } from "../../markers.ts";
|
||||
import type { Building } from "../../model.ts";
|
||||
@@ -59,7 +59,9 @@ export function watchedEntities(inputs: WatchInputs): string[] {
|
||||
const placed = placedEntities(b);
|
||||
const energy = b.energy;
|
||||
const lightsOfRooms = roomsOf(b).flatMap((r) => roomEntities(hass, r).filter((id) => kindOf(id) === "light"));
|
||||
const sensorsOfRooms = inputs.needsRoomSensors ? roomsOf(b).flatMap((r) => roomEntities(hass, r).filter((id) => id.startsWith("sensor.") || id.startsWith("climate."))) : [];
|
||||
const sensorsOfRooms = b.floors.flatMap((f) => f.rooms.flatMap((r) => inputs.needsRoomSensors || r.climate_card
|
||||
? [...roomEntities(hass, r).filter((id) => id.startsWith("sensor.") || id.startsWith("climate.")), ...Object.values(r.climate ?? {}).flat(), ...(["temperature", "humidity", "co2"] as const).flatMap((key) => roomClimateSensors(hass, f, r, key))]
|
||||
: []));
|
||||
const ids: MaybeId[] = [
|
||||
...placed,
|
||||
...b.floors.flatMap((f) => f.placements.map((p) => p.cover_tilt)),
|
||||
|
||||
Reference in new issue
Block a user