Skip to content

feat(ha-panels): fill the card, exact sizes down to 1x1, Bold look and fan speeds - #346

Merged
jherforth merged 3 commits into
jherforth:mainfrom
jasonstantler:feature/ha-panels-sizes
Oct 27, 2026
Merged

jherforth merged 3 commits into
jherforth:mainfrom
jasonstantler:feature/ha-panels-sizes

Conversation

@jasonstantler

Copy link
Copy Markdown
Contributor

Makes Home Assistant panels fit their card and adds sizing, a Bold look and fan speeds.

  • Tiles fill the card. Columns pick the squarest fit, rows share the height, and icons and text scale with the tile. Short rows put the icon beside the name; one tile fills the whole widget.
  • Exact size. Pick 1–12 × 1–12 in the builder, with a "fits best" hint and a true-size preview. Panels can go down to 1×1, and plugins can set size in their manifest. Resize buttons shrink on small widgets.
  • Long tiles. New full-width tile sizes.
  • Bold look (optional). Big centered icons, solid "on" tiles, dimmer/shade fills and icons that animate while on. Classic is unchanged.
  • Fans. One tap steps Off → Low → Medium → High, with speed segments.

🤖 Generated with Claude Code

… Bold look and fan speeds

Tiles fill the widget
- "Fit the widget" picks the columns that keep tiles closest to square,
  never more than the tiles fill, instead of auto-fill's empty tracks; rows
  share the height. Icons, words and buttons grow with the tile.
- Short rows put the icon beside the name; a panel becomes a list only when
  its tiles would be too small to tap. One tile alone is the whole widget.
- Long tiles: 'fx1' and 'fx2' span the panel's full width.

Size on the dashboard
- The builder sets a panel's exact size (1-12 columns by 1-12 rows) with a
  "fits best" hint, and previews it at that size on this screen. A new panel
  starts at it; changing it can resize the panel where it is placed.
- A plugin manifest may give `size` { minWidth, minHeight, width, height };
  panels go down to 1x1. The resize buttons shrink on small widgets so
  their pairs never overlap.

Bold look (a panel option, Classic stays as it was)
- Big centered icons, solid "on" tiles with a glow, dimmer and shade fills
  whose words change color under the fill, and icons that move while on
  (with a switch to turn that off). Colors are theme role tokens.
- Tiles are redrawn only when they change, so animations don't restart on
  every poll.

Fans with speeds
- One tap steps Off, Low, Medium, High. Any fan's speeds map onto those
  three from its percentage_step; segments show the speed and, in Bold, the
  blades spin faster.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jasonstantler
jasonstantler force-pushed the feature/ha-panels-sizes branch from 3d31a27 to 29ea2a7 Compare October 27, 2026 16:59
jherforth and others added 2 commits October 27, 2026 15:33
…ry display

Fans: the tap-to-step tile took a fan's speed step from Home Assistant but
always cut it down to Low, Medium and High, so a 4- or 6-speed fan lost the
speeds between, and a fan with 1% steps got a Low of 1%. Every fan with
speeds lost its slider. Now a fan with up to six speeds (from its
percentage_step) steps through each of them, named Low/Medium/High for
two or three and numbered beyond; a fan with more, or one that doesn't
report a step, keeps the slider. Template and server share the rule.

Resize: saving a new size rewrote the panel's placed layouts, but no
display heard of it, and a grid only rebuilt from saved layouts on a tab
or widget change, so even the display that saved it kept the old size
until a reload. The save now bumps the household settings counter (jherforth#325)
when it changed a layout, displays reload their layouts on it, and the
grid rebuilds when a widget's saved layout changes. The bump comes from
the save path, not the route, so taps on panel buttons don't trigger it.

The size picker starts from the panel's size on this display's tab, where
it had one, rather than the first display's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… manifest's size

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jherforth

Copy link
Copy Markdown
Owner

Thanks for this, it's a big improvement. The exact size picker in particular is a better answer than the three preview sizes it replaces. Before merging, I pushed a few fixes to the branch:

Fans follow their own speeds. The tap-to-step tile took the speed step from Home Assistant but always reduced it to Low, Medium and High:

  • a 4- or 6-speed fan lost the speeds in between;
  • a fan with 1% steps got a "Low" of 1%;
  • every fan with speeds lost its slider.

Now a fan with up to six speeds steps through each of them: Low/Medium/High for two or three speeds, numbered beyond that. A fan with more speeds, or one that doesn't report a step, keeps the slider. The template and the server share this rule.

Resizes reach every display. Saving a new size rewrote the placed layouts, but no display heard about it. The grid also only rebuilt from saved layouts on a tab or widget change, so even the display that saved the change kept the old size until a reload. Now:

Size picker. It now starts from the panel's size on this display, rather than on the first display that placed it.

Docs. I updated features.md, backend-api.md, and the manifest table in plugin-development.md, which now covers size.

Checks. Added tests for the fan rule and an end-to-end route test for resizing. Server 665/665, client 832/832, i18n and build clean. In Edge, the 3-speed, 6-speed and smooth fans render as expected, and a layout changed elsewhere redraws on a display within one check without a tab change.

🤖 Generated with Claude Code

@jherforth
jherforth merged commit afb68f6 into jherforth:main Oct 27, 2026
3 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in HomeGlow Kanban Oct 27, 2026
adamecker pushed a commit to adamecker/HomeGlow that referenced this pull request Oct 27, 2026
@jherforth jherforth added the enhancement New feature or request label Oct 28, 2026
@jherforth jherforth added this to the 1.11 milestone Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants