mirror of
https://github.com/Matysh/houseplan-card
synced 2026-07-31 08:28:31 +00:00
The inscribed-circle criterion is FLAT along the long axis of any elongated room — every midline point fits the same circle — and a plain argmax took the first plateau sample: left of centre on the owner's kitchen-living room, above centre in the sauna. The score now subtracts a soft pull toward the area centroid (shoelace-weighted): on the plateau the nearest- to-centroid point wins, while real clearance differences still dominate, so the point never wanders into a thinner limb of an L. Verified on a replica of the owner's floor: kitchen slab centre within a few units, sauna dead-centre both axes. Units: wide and tall rectangles centre on both axes; the L keeps to its slab near the centroid x.
Synthetic demo home
A fully fictional house (plans, devices, states) used for README screenshots, the demo GIF and headless smoke tests — so no real home data ever appears in public materials.
srv/demo.html— self-contained host page:<ha-icon>/<ha-card>stubs and a fakehass(registries, states,callWS,callService, floors).srv/assets/— generated plan SVGs andicons.js(node demo/gen_icons.mjs, needs the repo's devDependencies). The card bundle is copied fromdist/:cp dist/houseplan-card.js demo/srv/assets/.serve.mjs— playwright launcher (route interception, no web server).smoke_*.mjs— feature smoke tests; run with a Chromium installed viaPLAYWRIGHT_BROWSERS_PATH=<dir> npx playwright install chromium-headless-shell.
Note for sandboxed sessions: /tmp does not survive; this directory is the
persistent home of the harness (docs/DEVELOPMENT.md has the LD_LIBRARY_PATH recipe).