跳转到内容
开始使用

Display sizing

此内容尚不支持你的语言。

A Home Assistant dashboard designed in a desktop browser often renders at the wrong size on an Android wall panel: cards too large with clipped edges, or too small. A phone usually stays broadly in step with the desktop, but panels frequently do not, because their makers ship a system density and font scale that are poorly matched to the physical display. The panel app gives you two controls, density (DPI) and text size (font scale), in Install, then Display sizing, to bring the layout and the text back in line. You usually need both.

The Display sizing card on the panel’s Install tab sets a custom logical density and text size, applies them live, or resets to Android’s factory base density. Both survive a reboot, because they are Android system settings.

To tune it, open the same dashboard in a desktop browser for reference. Lower the density until the layout matches (more cards fit), then nudge the text size until the text matches. Good values depend on the installation (the panel’s resolution, how far away people stand, how the dashboard is designed) rather than on the model, which is why no standard values ship.

Control What it changes Mechanism
Density (DPI) The whole layout. The effective viewport in dp is physical px ÷ (density / 160). A lower density fits more, closer to a desktop’s wider viewport; a higher one is larger. wm density <n>
Text size (font scale) Text in the dashboard. Android’s system font scale becomes the WebView’s textZoom (textZoom = scale × 100). settings put system font_scale <f>

Android’s wm density output calls the factory base value Physical density. That label is misleading: it is the density Android uses for layout once an override is reset, not a measurement of the display’s pixels per inch. The panel app reports it as the factory base, and shows a physical PPI only for hardware profiles whose screen dimensions have been checked independently.

Changing density alone scales the layout but can leave text the wrong size compared with the desktop; the font scale corrects the text. Tuning the two together is what brings a panel in line with the browser the dashboard was designed in.

评论

评论保存在此页面对应的 GitHub 讨论中,因此加载评论会让你的浏览器连接到 GitHub。此浏览器会记住这一选择,并在你滚动到其他页面的评论区时加载评论。

我们 Home Assistant,以及 Open Home Foundation 所做的一切。

最近更新:

Build 212 · 61ef6de