Repository navigation
feat(ha-panels): fill the card, exact sizes down to 1x1, Bold look and fan speeds - #346
Conversation
… 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>
3d31a27 to
29ea2a7
Compare
…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>
|
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:
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 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 |
Makes Home Assistant panels fit their card and adds sizing, a Bold look and fan speeds.
sizein their manifest. Resize buttons shrink on small widgets.🤖 Generated with Claude Code