diff --git a/CHANGELOG.md b/CHANGELOG.md index a3fd4e5..920f84b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.7.16 - 2026-06-16 +- Beobachtete Aktoren werden in der Übersicht nach Raum oder Typ gruppiert und + mit Friendly Name angezeigt. + ## 0.7.15 - 2026-06-16 - Add-on-Start ist robust gegen Home-Assistant-Core-502 beim Systemboot: API und WebSocket-Listener starten trotzdem, Reconciliation/Training werden diff --git a/addon/config.yaml b/addon/config.yaml index b16adba..86b7e5b 100644 --- a/addon/config.yaml +++ b/addon/config.yaml @@ -1,5 +1,5 @@ name: SillyHome Next -version: "0.7.15" +version: "0.7.16" slug: sillyhome_next description: Lernt automatisch aus deinem Verhalten und steuert freigegebene Aktoren url: http://192.168.6.31:3000/pino/sillyhome-next diff --git a/app/main.py b/app/main.py index 0487fed..5b4694c 100644 --- a/app/main.py +++ b/app/main.py @@ -105,7 +105,7 @@ async def lifespan(app: FastAPI) -> AsyncIterator[None]: app = FastAPI( title="SillyHome Next API", description="Lokales Smart-Home-Intelligenzsystem für Home Assistant.", - version="0.7.15", + version="0.7.16", lifespan=lifespan, ) app.state.settings = load_settings() diff --git a/app/static/index.html b/app/static/index.html index a1bd6f1..374fbff 100644 --- a/app/static/index.html +++ b/app/static/index.html @@ -465,13 +465,28 @@ async function configureActuator() { async function loadConfiguredActuators() { const box = document.getElementById("configured-actuators"); try { - const rows = await api("v1/actuators"); + const [rows, entities] = await Promise.all([ + api("v1/actuators"), + api("v1/entities"), + ]); + const entityMap = new Map(entities.map(entity => [entity.entity_id, entity])); + const groups = new Map(); + for (const record of rows) { + const entity = entityMap.get(record.actuator_entity_id) || {}; + const group = entity.area_name || actuatorGroupLabel(record.actuator_entity_id.split(".", 1)[0]); + if (!groups.has(group)) groups.set(group, []); + groups.get(group).push({record, entity}); + } + const groupedRows = [...groups.entries()].sort(([left], [right]) => left.localeCompare(right)); box.innerHTML = rows.length ? ` -
- ${rows.map(record => ` + ${groupedRows.map(([group, items]) => ` +

${escapeHtml(group)}

+
+ ${items.map(({record, entity}) => `
+
${escapeHtml(entity.friendly_name || record.actuator_entity_id)}
${escapeHtml(record.actuator_entity_id)}
${escapeHtml(behaviorLabel(record))}
@@ -493,7 +508,8 @@ async function loadConfiguredActuators() {
`).join("")} -
` : "

Noch keine Aktoren ausgewählt.

"; +
+ `).join("")}` : "

Noch keine Aktoren ausgewählt.

"; } catch (error) { box.textContent = error.message; } diff --git a/pyproject.toml b/pyproject.toml index a189fc4..a781e4a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "sillyhome-next" -version = "0.7.15" +version = "0.7.16" description = "Lokales Smart-Home-Intelligenzsystem für Home Assistant" requires-python = ">=3.11" dependencies = [