thomasloven / lovelace-layout-card

🔹 Get more control over the placement of lovelace cards.
MIT License
1.05k stars 125 forks source link

Question: how to make a dashboard fit the screen? #295

Open felipecrs opened 3 months ago

felipecrs commented 3 months ago

I have a dashboard with a single camera. If I make it 1-card panel, it will expand to the whole screen horizontally but then vertically I will have scroll bars.

I am looking for a layout that can make the card within it fit the screen (i.e. no scroll bars).

For example, when orientation is portrait, the height is probably not a problem for a 16:9 camera, but the width will constrain. This already works by default using 1-card panel.

However, when orientation is landscape, the width is not a problem for a 16:9 camera, but often the height is, because I have the Home Assistant bar, the Android notification bar, the navigation bar at the bottom if we talk about an Android device like a tablet in the wall.

Is this anyhow achievable? I want the height of the dashboard content to be constrained by the height of the view port, and limit the width proportionally to ensure height is within the viewport.

I already searched many places but I cannot come up with a solution. Do you think layout card can achieve this?

Found this reference with no answer: https://community.home-assistant.io/t/have-a-panel-card-fit-to-page-so-it-is-not-bigger-than-the-screen/193751/5