kalkih / mini-graph-card

Minimalistic graph card for Home Assistant Lovelace UI
MIT License
2.85k stars 231 forks source link

Layoutoption with HA 2024.7.0bx #1111

Open ChristophCaina opened 1 week ago

ChristophCaina commented 1 week ago

With HomeAssistant 2024.7.x a new Layout-Option for cards will be implemented. This option does allow to define, what size a card should have.

This can be implemented in UI or via YAML:

UI Option for different cards: image

same card, yaml-code:

type: gauge
entity: sensor.heizkorperthermostat_kuche_level
name: Ventilstellung
layout_options:
  grid_columns: 2
  grid_rows: 2

I've used the yaml option for the mini-graph-card as well - and it is working

type: custom:mini-graph-card
entities:
  - entity: sensor.heizkorperthermostat_kuche_actual_temperature
hours_to_show: 24
points_per_hour: 4
name: Temperatur
layout_options:
  grid_columns: 2
  grid_rows: 2

image

But having the gauge and the mini-graph-card placed by each other, it is visible, that the graph card is slightly bigger than the gauge:

This screenshot is showing the same configuration - in the first row, both cards are placed inside a horizontal-stack card, In the row below, they are using the new layout option inside a section. image

Silther commented 2 days ago

Saw the same thing, there should be an option for adaptive height or something like that. Because different zoom level in the browser or even the mobile app have all slightly different heights you cannot hardcode the correct height.