fix: support Symcon numeric dimmers and independent blind slat controls

This commit is contained in:
jhartworks committed 2026-11-09 15:24:59 +01:00
1 parent b934f78b9a
commit 24188f96f7
36 files changed
+1105 -683

No files matched your search

+5 -2
View File
@@ -21,6 +21,7 @@ import { hassAt, loadHistory } from "../live/time-travel.ts";
import { curvePath } from "../live/day-curves.ts";
import { controls, tokens } from "../styles.ts";
import type { HassEntity, HomeAssistant } from "../types.ts";
import { coverTiltEntity, coverWithTilt } from "../entities/covers.ts";
const COVER_SET_POSITION = 4;
const COVER_STOP = 8;
@@ -676,7 +677,7 @@ export class NfRoomPanel extends LitElement {
${this.nameButton(id)}
<span class="nf-rp-state">${this.stateOf(st)}</span>
${this.toggle(st, on, () => this.call("light", "toggle", { entity_id: id }))}
${on && dimmable && !simple
${dimmable && !simple
? html`<label class="nf-rp-slider"
><span>${this.t("brightness")}</span>
<input
@@ -715,6 +716,8 @@ export class NfRoomPanel extends LitElement {
}
private coverRow(st: HassEntity) {
const tiltEntity = coverTiltEntity(this.hass, this.building?.floors ?? [], st.entity_id);
st = coverWithTilt(this.hass, st, tiltEntity);
const a = st.attributes;
const features = (a.supported_features as number | undefined) ?? 0;
const id = st.entity_id;
@@ -752,7 +755,7 @@ export class NfRoomPanel extends LitElement {
max="100"
?disabled=${na}
.value=${String(a.current_tilt_position)}
@change=${(e: Event) => this.call("cover", "set_cover_tilt_position", { entity_id: id, tilt_position: Number((e.target as HTMLInputElement).value) })}
@change=${(e: Event) => this.call("cover", "set_cover_tilt_position", { entity_id: tiltEntity ?? id, tilt_position: Number((e.target as HTMLInputElement).value) })}
/></label>`
: features & 48
? html`<div class="nf-rp-buttons">