From 9725f1ae8993a18ff287617a77efe720bcfc6d3a Mon Sep 17 00:00:00 2001 From: Willem Date: Wed, 4 Nov 2026 12:45:50 +0100 Subject: [PATCH 1/5] feat(plugins): plugin manifest API + generic device import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit window.floorplanStudio.registerPlugin({id, apiVersion, provides}) lets third-party integrations contribute device sources, toolbar actions and style defaults without integration-specific code in this repo: - deviceSources: live fetch(ws)/offline parse providers shown in the generic Devices modal (was the RAMSES modal). The bundled ramses source registers through the same public API as the reference impl. - actions: toolbar items emitting floorplan-studio:action CustomEvents ({pluginId, actionId, projectId, floorId, selection}) — documented, bubbles+composed so they escape the card shadow root. - iconMap / markerDefaults / stateRulePresets (role-bound): merged as plugin < user opts < device hints; css injected once, re-attached to the card's shadow root in HACS mode. - apiVersion + ignored-unknown-provides-keys for independent versioning. importProject() merges a project fragment in one undo step and projects.* (active/list/get/save/remove/open) replace the direct IndexedDB pokes integrations needed before. callWS() exposes the active HA link; documented events: action / project-imported / plugins-changed. Also: registry fallback now reads parent_device_id alongside via_device (HA 2026.9 child devices), and devices carry suggested=false for gateways instead of a hardcoded group check in the planner. --- CHANGELOG.md | 16 +- USER_GUIDE.md | 103 ++++++++-- src/App.tsx | 8 +- src/ha/wsCaller.ts | 23 +++ src/hacs-card.tsx | 5 + .../DeviceImportModal.tsx} | 175 ++++++++++------ src/{ramses => import}/plan.ts | 84 +++++--- src/main.tsx | 2 + src/panels/Toolbar.tsx | 42 +++- src/plugins/api.ts | 166 ++++++++++++++++ src/plugins/events.ts | 35 ++++ src/plugins/install.ts | 6 + src/plugins/registry.test.ts | 85 ++++++++ src/plugins/registry.ts | 134 +++++++++++++ src/plugins/types.ts | 187 ++++++++++++++++++ src/ramses/fetch.ts | 30 +-- src/ramses/provider.ts | 58 ++++++ src/ramses/ramses.test.ts | 16 +- src/ramses/topology.ts | 76 ++++--- src/ui/HelpModal.tsx | 12 +- 20 files changed, 1084 insertions(+), 179 deletions(-) create mode 100644 src/ha/wsCaller.ts rename src/{ramses/RamsesImportModal.tsx => import/DeviceImportModal.tsx} (69%) rename src/{ramses => import}/plan.ts (77%) create mode 100644 src/plugins/api.ts create mode 100644 src/plugins/events.ts create mode 100644 src/plugins/install.ts create mode 100644 src/plugins/registry.test.ts create mode 100644 src/plugins/registry.ts create mode 100644 src/plugins/types.ts create mode 100644 src/ramses/provider.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index f046e30..46eecef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- **Plugin API** (`window.floorplanStudio`): third-party integrations can register their own + device sources, toolbar actions and style defaults via `registerPlugin({id, apiVersion, provides})`. + The manifest is data plus functions the editor calls — no DOM refs are handed out, unknown + `provides` keys are ignored so plugins and the editor version independently. Capability slots: + `deviceSources` (shown in the **Devices** modal: `fetch(ws)` for live import, `parse(text)` for + offline input), `actions` (toolbar items that emit a documented `floorplan-studio:action` + CustomEvent with `{pluginId, actionId, projectId, floorId, selection}`), `iconMap`, + `markerDefaults`, `stateRulePresets` (role-bound rules appended to imported markers) and `css` + (injected once, into the card's shadow root in HACS mode). Also new: `importProject()` merging a + project fragment in one undo step, `projects.*` (list/get/save/remove/open) replacing direct + IndexedDB access, `callWS()` for the active HA link, and documented events + (`floorplan-studio:action`, `floorplan-studio:project-imported`, + `floorplan-studio:plugins-changed`). See USER_GUIDE → *Plugin API for integrations*; the bundled + RAMSES source registers through the same public API as the reference implementation. - **Import a floorplan card already in Home Assistant** (toolbar → **Import card**): scans every Lovelace dashboard over the WebSocket (or takes pasted card / view / dashboard YAML) for `custom:floorplan-card` and `picture-elements` cards and imports one as a new project or a new @@ -19,7 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 area / name; the remaining drawing becomes the background with converted elements stripped. Studio's own exports round-trip icons, colours, labels and state rules. - Room inspector keeps an imported HA area visible even when it isn't in the entity list. -- **RAMSES RF / Ramses Extras import** (toolbar → **RAMSES**): adds evohome / RAMSES-II +- **RAMSES RF / Ramses Extras import** (toolbar → **Devices** → *RAMSES RF / Ramses Extras*): adds evohome / RAMSES-II devices as markers. Reads live from Ramses Extras' `ramses_extras/floorplan_helper/get_topology` WebSocket command, falling back to the HA device/entity registries filtered to `ramses_cc` when Extras isn't installed. Offline it accepts a diff --git a/USER_GUIDE.md b/USER_GUIDE.md index 4d1d1e0..791b4b4 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -110,32 +110,39 @@ What you get: - **picture-elements**: the image becomes the background (canvas = image size) and each positioned entity element a marker (`state-label` → live label, conditional elements → marker visibility). -### Import RAMSES RF / Ramses Extras devices +### Import devices (registered integrations) -For evohome / RAMSES-II systems run through [Ramses RF](https://github.com/ramses-rf/ramses_cc) -(`ramses_cc`) and, optionally, [Ramses Extras](https://github.com/wimpie70/ramses_extras): +The **Devices** toolbar button opens the generic device importer. The sources it lists come from +integrations registered through the [plugin API](#plugin-api-for-integrations) — Floorplan Studio +ships a bundled RAMSES RF source described below; other integrations (yours?) can register their own. 1. Draw a room for every space and set its **HA area** in the Inspector (or give the room the same name as the HA area). This is how devices find their room. -2. Click **RAMSES** in the toolbar. -3. **Read RAMSES devices** (needs the Home Assistant link — token or dashboard-card mode): - - with **Ramses Extras** installed it calls `ramses_extras/floorplan_helper/get_topology`, which - already resolves zones, parent links, display names and each device's primary entity; - - without Extras it rebuilds the same list from the HA device/entity/area/floor registries, - filtered to `ramses_cc`. -4. Or **paste / load** offline data: - - a saved `get_topology` result (raw or wrapped in the WebSocket `result`), - - the response of the Extras service `ramses_extras.floorplan_seed_studio` (or any studio project - JSON) — its markers and missing rooms are **merged** into the current project, scaled to this - canvas, - - a ramses_cc `known_list`, a ramses_rf schema or even a packet log — every device id - (`04:123456`, zones `01:123456_02`) is matched to your HA entities. -5. Review the table: tick devices (gateway is off by default), choose labels, extra entities +2. Click **Devices** in the toolbar and pick a source (needs the Home Assistant link — token or + dashboard-card mode). +3. Or **paste / load** whatever a source recognises offline — the modal tries each registered + source's parser, and a raw studio project JSON merges without one. + +**Bundled source: RAMSES RF / Ramses Extras.** For evohome / RAMSES-II systems run through +[Ramses RF](https://github.com/ramses-rf/ramses_cc) (`ramses_cc`) and, optionally, +[Ramses Extras](https://github.com/wimpie70/ramses_extras): + +- **RAMSES RF / Ramses Extras** (live) — with **Ramses Extras** installed it calls + `ramses_extras/floorplan_helper/get_topology`, which already resolves zones, parent links, + display names and each device's primary entity; without Extras it rebuilds the same list from + the HA device/entity/area/floor registries, filtered to `ramses_cc` (reading both `via_device_id` + and the HA 2026.9+ `parent_device_id` for parent links). +- Offline **paste / load**: a saved `get_topology` result (raw or wrapped in the WebSocket + `result`), the response of the Extras service `ramses_extras.floorplan_seed_studio` (or any + studio project JSON) — its markers and missing rooms are **merged** into the current project, + scaled to this canvas — or a ramses_cc `known_list`, ramses_rf schema or packet log: every device + id (`04:123456`, zones `01:123456_02`) is matched to your HA entities. +4. Review the table: tick devices (gateways are off by default), choose labels, extra entities (temperature, heat demand, CO₂…), ready-made **state rules** (offline grey, battery-low blink, window-open icon, heat-demand gradient) and marker size. Each row shows where the device goes: *room*, *staging row* (bottom edge of the floor matching the area's HA floor, else the active floor) or *already on plan*. -6. **Add markers**. The whole import is one undo step, and running it again only adds devices that +5. **Add markers**. The whole import is one undo step, and running it again only adds devices that aren't on the plan yet. Icons follow the device class: zone `home-thermometer`, TRV `radiator`, controller `thermostat`, @@ -197,3 +204,63 @@ After adding the card, toggle one of your lights from the map and confirm the ma colour follows the entity state, and that any sensor markers show their live value. If a marker sits slightly off, nudge it in the editor (arrow keys) and re-export — because the export is embedded, that's just Copy YAML → replace the card contents. + +--- + +## Plugin API for integrations + +Floorplan Studio exposes `window.floorplanStudio` so third-party integrations can register their own +**device sources, toolbar actions and style defaults** — no integration-specific code needs to live +in this repository. The bundled RAMSES source (`src/ramses/provider.ts`) registers through exactly +this public API and doubles as the reference implementation. + +```ts +window.floorplanStudio.registerPlugin({ + id: 'ramses', // unique; re-registering replaces (external may supersede bundled) + apiVersion: 1, + provides: { + deviceSources: [{ + id: 'ramses', + title: 'RAMSES RF / Ramses Extras', // label in the Devices modal + description: 'evohome / RAMSES-II devices', + fetch: async (ws, ctx) => ({ // live: called with the active HA WebSocket + topology: { source: 'ramses_extras', devices: [...], areas: {}, floors: {} }, + note: 'optional extra line under the count', + }), + parse: (text, ctx) => ({ kind: 'topology' | 'project' | 'error' | 'nomatch', ... }), + }], + actions: [{ + id: 'ramses.seed-devices', label: 'Add devices', icon: 'devices', location: 'toolbar', + }], + iconMap: { FAN: 'fan', TRV: 'radiator' }, // class token → mdi icon fallback + markerDefaults: { size: 40 }, // merged: plugin < user opts < device hints + stateRulePresets: [ // appended to imported markers, role-bound + { entityRole: 'battery', mode: 'stringMatch', match: 'on', color: '#ef4444', animation: 'blink' }, + ], + css: '/local/my_integration/floorplan.css', // injected once (card mode: shadow root) + }, +}); +``` + +- **The manifest is data + functions the editor calls** — no DOM refs, no component internals, + the editor keeps lifecycle control. Unknown `provides` keys are ignored: plugins and the editor + version independently (`apiVersion`). +- **DeviceTopology** is the neutral model sources return: `devices[]` with `device_id`, + `device_class`/`group` (free-form display/grouping tokens), `area_id`, `primary_entity`, + `entities[]` (`{entity_id, domain, role}`), plus optional `icon`/`color`/`kind`/`suggested` + presentation hints, `actions`/`style`/`visibility` passthrough (per-gesture overrides, e.g. a + FAN's double-tap opening a custom card — users can still edit per-marker afterwards), and + `parent` for topology-aware integrations. +- **Events** need no registry — just `addEventListener` on `window`: + - `floorplan-studio:action` — a plugin action was clicked. + `detail: {pluginId, actionId, projectId, floorId, selection: string[]}` + - `floorplan-studio:project-imported` — `detail: {pluginId?, mode, markers, rooms}` + - `floorplan-studio:plugins-changed` — `detail: {plugins: string[]}` +- **`floorplanStudio.importProject(json, {mode})`** — merge a studio project/fragment into the open + project in one undo step (`'merge'`, default; floors pair by name, scaled to the canvas) or + `'replace'` it. This replaces writing to the editor's IndexedDB directly. +- **`floorplanStudio.projects`** — `active()`, `list()`, `get(id)`, `save(p)`, `remove(id)`, + `open(id)` — the supported way to read/write stored projects. +- **`floorplanStudio.callWS(msg)`** — call the active Home Assistant WebSocket (throws when not + connected); also `floorplanStudio.registry.*` for introspection and `subscribe(cb)` to be notified + when the plugin set changes. diff --git a/src/App.tsx b/src/App.tsx index 0d15543..c26ff69 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -11,12 +11,12 @@ import { HelpModal } from './ui/HelpModal'; import { ConnectModal } from './ha/ConnectModal'; import { ProjectsModal } from './persist/ProjectsModal'; import { ExportModal } from './export/ExportModal'; -import { RamsesImportModal } from './ramses/RamsesImportModal'; +import { DeviceImportModal } from './import/DeviceImportModal'; import { HaImportModal } from './haimport/HaImportModal'; import { useAutosave } from './persist/useAutosave'; import { subscribeHass, hassToSource, getHass, HassLike } from './ha/hassBridge'; -type ModalId = null | 'help' | 'connect' | 'projects' | 'export' | 'ramses' | 'haimport'; +type ModalId = null | 'help' | 'connect' | 'projects' | 'export' | 'import' | 'haimport'; export default function App() { const [modal, setModal] = useState(null); @@ -99,7 +99,7 @@ export default function App() { onOpenExport={() => setModal('export')} onOpenProjects={() => setModal('projects')} onOpenConnect={() => setModal('connect')} - onOpenRamses={() => setModal('ramses')} + onOpenImport={() => setModal('import')} onOpenHaImport={() => setModal('haimport')} onOpenHelp={() => setModal('help')} /> @@ -125,7 +125,7 @@ export default function App() { {modal === 'connect' && setModal(null)} />} {modal === 'projects' && setModal(null)} />} {modal === 'export' && setModal(null)} />} - {modal === 'ramses' && setModal(null)} />} + {modal === 'import' && setModal(null)} />} {modal === 'haimport' && setModal(null)} />} ); diff --git a/src/ha/wsCaller.ts b/src/ha/wsCaller.ts new file mode 100644 index 0000000..01541ea --- /dev/null +++ b/src/ha/wsCaller.ts @@ -0,0 +1,23 @@ +// A WebSocket caller bound to whichever Home Assistant link is active: +// the URL+token HaClient (standalone) or the `hass` object Lovelace injects +// (HACS card mode). Shared by the editor's own importers and exposed to +// plugins as `floorplanStudio.callWS`. +import { haClient } from './client'; +import { getHass } from './hassBridge'; +import { useStore } from '../state/store'; +import type { WsCall } from '../plugins/types'; + +export type { WsCall }; + +/** A WebSocket caller for the live HA link, or null when running on demo data. */ +export function liveWsCaller(): WsCall | null { + const { conn, usingDemo } = useStore.getState(); + if (usingDemo || conn.status !== 'connected') return null; + if (conn.url === 'this dashboard') { + const h = getHass(); + if (h?.callWS) return (msg) => h.callWS!(msg); + if (h?.connection?.sendMessagePromise) return (msg) => h.connection!.sendMessagePromise(msg); + return null; + } + return haClient.connected ? (msg) => haClient.sendWS(msg) : null; +} diff --git a/src/hacs-card.tsx b/src/hacs-card.tsx index 05026ac..d6340d8 100644 --- a/src/hacs-card.tsx +++ b/src/hacs-card.tsx @@ -4,10 +4,13 @@ // // Built by vite.hacs.config.ts into a single dist-hacs/floorplan-studio.js that // HACS serves as a Lovelace resource. +import './plugins/install'; // window.floorplanStudio before providers register +import './ramses/provider'; // built-in RAMSES device source (self-registers) import { StrictMode } from 'react'; import { createRoot, Root } from 'react-dom/client'; import App from './App'; import { setHass, HassLike } from './ha/hassBridge'; +import { setPluginStyleRoot } from './plugins/registry'; // `?inline` gives the CSS as a string instead of injecting it into document // — we put it in the shadow root instead. import cssText from './styles.css?inline'; @@ -38,6 +41,8 @@ class FloorplanStudioCard extends HTMLElement { if (this.mounted) return; this.mounted = true; const shadow = this.attachShadow({ mode: 'open' }); + // plugin css links land inside this shadow root, not document.head + setPluginStyleRoot(shadow as unknown as HTMLElement); const style = document.createElement('style'); style.textContent = HOST_CSS + cssText; shadow.appendChild(style); diff --git a/src/ramses/RamsesImportModal.tsx b/src/import/DeviceImportModal.tsx similarity index 69% rename from src/ramses/RamsesImportModal.tsx rename to src/import/DeviceImportModal.tsx index 9f29770..3e6e696 100644 --- a/src/ramses/RamsesImportModal.tsx +++ b/src/import/DeviceImportModal.tsx @@ -1,23 +1,26 @@ +// Generic "Import devices" modal — the editor side of the deviceSources +// capability. Registered providers (src/plugins/types.ts) supply fetch/parse; +// this modal only knows the neutral DeviceTopology contract: tick devices, +// preview placement (room match / staging row), apply in one undo step. import { useMemo, useRef, useState } from 'react'; import { useStore } from '../state/store'; import { Modal } from '../ui/Modal'; import { iconPath } from '../ui/icons'; import type { Project } from '../model/schema'; -import { EXTRAS_TOPOLOGY_WS, fetchRamsesTopology, liveWsCaller } from './fetch'; +import { liveWsCaller } from '../ha/wsCaller'; import { - CLASS_LABEL, - GROUP_COLOR, - iconForClass, - parseRamsesInput, - RamsesTopology, - topologyFromIds, -} from './topology'; + getDeviceSources, + getIconMap, + getMarkerDefaults, + getStateRulePresets, +} from '../plugins/registry'; +import type { DeviceTopology, ParsedSourceInput } from '../plugins/types'; import { applyMerge, applyPlan, defaultSelection, planProjectMerge, - planRamsesImport, + planDeviceImport, RowStatus, } from './plan'; @@ -31,23 +34,26 @@ const STATUS_TEXT: Record = { off: 'skipped', }; -const SOURCE_TEXT: Record = { - ramses_extras: 'Ramses Extras floorplan helper', - ramses_cc: 'ramses_cc device registry', - device_ids: 'device ids matched to HA entities', -}; +const FALLBACK_COLOR = '#ffc107'; + +function isProject(v: unknown): v is Project { + return !!v && typeof v === 'object' && Array.isArray((v as { floors?: unknown }).floors); +} -export function RamsesImportModal({ onClose }: { onClose: () => void }) { +export function DeviceImportModal({ onClose }: { onClose: () => void }) { const project = useStore((s) => s.project); const entities = useStore((s) => s.entities); const usingDemo = useStore((s) => s.usingDemo); useStore((s) => s.conn); // re-render when the HA link changes const call = liveWsCaller(); + const sources = getDeviceSources(); + const ctx = useMemo(() => ({ entities, usingDemo }), [entities, usingDemo]); + const [text, setText] = useState(''); const [busy, setBusy] = useState(false); const [msg, setMsg] = useState(null); - const [topo, setTopo] = useState(null); + const [topo, setTopo] = useState(null); const [incoming, setIncoming] = useState(null); const [selected, setSelected] = useState>(new Set()); const [markerSize, setMarkerSize] = useState(32); @@ -58,22 +64,23 @@ export function RamsesImportModal({ onClose }: { onClose: () => void }) { const [includeRooms, setIncludeRooms] = useState(true); const fileRef = useRef(null); - function loadTopology(t: RamsesTopology, note?: string) { + function loadTopology(t: DeviceTopology, note?: string) { setTopo(t); setIncoming(null); setSelected(defaultSelection(useStore.getState().project, t)); setMsg({ kind: 'info', - text: `${t.devices.length} RAMSES devices from the ${SOURCE_TEXT[t.source]}.${note ? ' ' + note : ''}`, + text: `${t.devices.length} devices from ${t.sourceLabel ?? t.source}.${note ? ' ' + note : ''}`, }); } - async function fetchLive() { - if (!call) return; + async function fetchSource(id: string) { + const src = sources.find((s) => s.source.id === id)?.source; + if (!src?.fetch || !call) return; setBusy(true); setMsg(null); try { - const { topology, note } = await fetchRamsesTopology(call); + const { topology, note } = await src.fetch(call, ctx); loadTopology(topology, note); } catch (e) { setMsg({ kind: 'err', text: (e as Error).message || String(e) }); @@ -83,30 +90,53 @@ export function RamsesImportModal({ onClose }: { onClose: () => void }) { } function parse(src: string) { - const r = parseRamsesInput(src); - switch (r.kind) { - case 'topology': - return loadTopology(r.topology); - case 'project': - setTopo(null); - setIncoming(r.project); - return setMsg({ - kind: 'info', - text: `Studio project "${r.project.name ?? 'seeded'}" with ${r.project.floors.length} floor(s) — its markers can be merged into this project.`, - }); - case 'ids': { - const t = topologyFromIds(r.ids, entities); - const matched = t.devices.filter((d) => d.entities.length).length; - return loadTopology( - t, - usingDemo - ? 'Connect to Home Assistant first — device ids are matched against your real entity list.' - : `${matched} matched to HA entities by id.`, - ); + // A raw studio project merges without needing a provider's parser. + try { + const data = JSON.parse(src); + const unwrapped = (data as { project_json?: unknown })?.project_json ?? data; + if (typeof unwrapped === 'string') { + const inner = JSON.parse(unwrapped); + if (isProject(inner)) return loadProject(inner); } - default: - setMsg({ kind: 'err', text: r.error }); + if (isProject(unwrapped)) return loadProject(unwrapped); + } catch { + /* not JSON — fall through to provider parsers */ } + for (const { source } of sources) { + if (!source.parse) continue; + let r: ParsedSourceInput; + try { + r = source.parse(src, ctx); + } catch (e) { + setMsg({ kind: 'err', text: `${source.title}: ${(e as Error).message || e}` }); + return; + } + switch (r.kind) { + case 'topology': + return loadTopology(r.topology, r.note); + case 'project': + return loadProject(r.project); + case 'error': + return setMsg({ kind: 'err', text: r.error }); + default: + continue; // nomatch — try the next source + } + } + setMsg({ + kind: 'err', + text: sources.some((s) => s.source.parse) + ? 'No registered source recognised this input.' + : 'No source can parse pasted input — connect to Home Assistant and fetch devices instead.', + }); + } + + function loadProject(p: Project) { + setTopo(null); + setIncoming(p); + setMsg({ + kind: 'info', + text: `Studio project "${p.name ?? 'seeded'}" with ${p.floors.length} floor(s) — its markers can be merged into this project.`, + }); } async function loadFile(file?: File | null) { @@ -119,13 +149,16 @@ export function RamsesImportModal({ onClose }: { onClose: () => void }) { const plan = useMemo( () => topo - ? planRamsesImport(project, topo, project.activeFloorId, { + ? planDeviceImport(project, topo, project.activeFloorId, { selected, markerSize, labels, extraEntities, stateRules, allFloors, + iconMap: getIconMap(), + markerDefaults: getMarkerDefaults(), + presets: getStateRulePresets().map((p) => p.preset), }) : null, [project, topo, selected, markerSize, labels, extraEntities, stateRules, allFloors], @@ -149,6 +182,12 @@ export function RamsesImportModal({ onClose }: { onClose: () => void }) { return c; }, [plan]); + /** distinct group tokens present in the topology → one select-button each */ + const groups = useMemo( + () => (topo ? [...new Set(topo.devices.map((d) => d.group).filter(Boolean))] : []), + [topo], + ); + function toggle(id: string) { setSelected((s) => { const n = new Set(s); @@ -197,26 +236,34 @@ export function RamsesImportModal({ onClose }: { onClose: () => void }) { const mergeMarkers = merge?.reduce((n, m) => n + m.markers.length, 0) ?? 0; const mergeRooms = merge?.reduce((n, m) => n + m.rooms.length, 0) ?? 0; + const iconMap = getIconMap(); return ( - +

- Drop your evohome / RAMSES-II devices onto the plan as markers — zones, radiator valves, thermostats, - ventilation units, CO₂ sensors and remotes. Devices whose HA area matches a room (the room's{' '} + Drop devices onto the plan as markers. Devices whose HA area matches a room (the room's{' '} HA area or its name) land inside that room; the rest wait in a staging row at the bottom of - the floor. + the floor. Sources below are contributed by registered integrations.

From Home Assistant
- + {sources.filter((s) => s.source.fetch).length === 0 && ( +
No live device sources registered.
+ )} + {sources + .filter((s) => s.source.fetch) + .map(({ pluginId, source }) => ( +
+ + {source.description &&
{source.description}
} +
+ ))}
- {call - ? 'Uses Ramses Extras when installed, otherwise the ramses_cc integration directly.' - : 'Connect to Home Assistant first (top-right HA button).'} + {call ? '' : 'Connect to Home Assistant first (top-right HA button).'}
@@ -225,7 +272,9 @@ export function RamsesImportModal({ onClose }: { onClose: () => void }) { className="fp-rx-paste" value={text} onChange={(e) => setText(e.target.value)} - placeholder={`Ramses Extras ${EXTRAS_TOPOLOGY_WS} result,\nfloorplan_seed_studio response / studio project JSON,\nor ramses_cc known_list / schema (any text with ids like 04:123456)`} + placeholder={ + 'A studio project JSON, an integration topology response,\nor any text a registered source recognises' + } spellCheck={false} />
@@ -256,7 +305,7 @@ export function RamsesImportModal({ onClose }: { onClose: () => void }) {