feat: add fresh-water cascades with independent stations and buffer links
This commit is contained in:
1 parent
a2a119d3ee
commit
992c3e18f2
30 files changed
+2199
-1578
No files matched your search
@@ -6,6 +6,7 @@ import { entityOptions } from "../entities.ts";
|
||||
import { checkField, entityField, hint, numberField, pinShiftField, selectField, textField } from "../fields.ts";
|
||||
import { renderDeviceValues } from "../device-values.ts";
|
||||
import type { EditorHost } from "../host.ts";
|
||||
import { renderFreshwaterForm } from "./freshwater.ts";
|
||||
|
||||
export function renderHydronicForm(host: EditorHost, item: Furniture, update: (patch: Partial<Furniture>) => void) {
|
||||
const h = hydronicConfig(item), options = entityOptions(host.hass, () => true);
|
||||
@@ -46,7 +47,7 @@ export function renderHydronicForm(host: EditorHost, item: Furniture, update: (p
|
||||
<button class="nf-link nf-wide" ?disabled=${!host.admin} @click=${() => set({ sensors: (h.sensors ?? []).filter((s) => s.id !== probe.id) })}>× Fühlerplatz entfernen</button>
|
||||
</div></details>`;
|
||||
})}<button class="nf-btn nf-hydronic-add-probe" title="Bis zu 64 Fühlerplätze" ?disabled=${!host.admin || (h.sensors?.length ?? 0) >= 64} @click=${() => set({ sensors: [...(h.sensors ?? []), { id: uid("probe"), name: `Fühler ${(h.sensors?.length ?? 0) + 1}`, entity: null, level: .5 }] })}>+ Fühlerplatz hinzufügen</button>` : nothing}
|
||||
${item.type === "freshwater_station" ? html`<div class="nf-form">${temperatures}${numeric("Zirkulationstemperatur", h.circulation_temperature, (circulation_temperature) => set({ circulation_temperature }))}${numeric("Trinkwarmwasser", h.hot_water, (hot_water) => set({ hot_water }))}${control("Ladepumpe", h.pump, (pump) => set({ pump }))}${control("Zirkulationspumpe", h.circulation, (circulation) => set({ circulation }))}</div>` : nothing}
|
||||
${item.type === "freshwater_station" ? renderFreshwaterForm(host,item,update) : nothing}
|
||||
${renderDeviceValues(host, item.values, (values) => update({ values }))}
|
||||
</section>`;
|
||||
}
|
||||
Reference in new issue
Block a user