feat: discover Symcon room utility meters and sum floor consumption
This commit is contained in:
1 parent
18e73194e0
commit
a804fc8e15
27 files changed
+2504
-1874
No files matched your search
@@ -10,6 +10,7 @@ import { parkingEntities } from "../../parking.ts";
|
||||
import { pluginWatched } from "../../plugins/registry.ts";
|
||||
import type { HomeAssistant } from "../../types.ts";
|
||||
import { weatherEntity } from "../../weather.ts";
|
||||
import { utilityWatched } from "../../utilities.ts";
|
||||
|
||||
export interface WatchInputs {
|
||||
hass: HomeAssistant;
|
||||
@@ -64,6 +65,7 @@ export function watchedEntities(inputs: WatchInputs): string[] {
|
||||
: []));
|
||||
const ids: MaybeId[] = [
|
||||
...placed,
|
||||
...utilityWatched(hass, b.floors),
|
||||
...b.floors.flatMap((f) => f.placements.flatMap((p) => [p.cover_tilt, p.position, ...(p.values ?? []).map((v) => v.entity)])),
|
||||
...openingIds(inputs.openingLinks),
|
||||
...placed.map((id) => powerSensorFor(hass, id)),
|
||||
|
||||
Reference in new issue
Block a user