fredrikpersson92 / minihass

MiniHass UI Dashboard for Home Assistant
Creative Commons Attribution 4.0 International
150 stars 10 forks source link

Get 2 cards on the same line + navigation #22

Open raftheunis87 opened 7 months ago

raftheunis87 commented 7 months ago

Hello,

First of all, kudos for all the work you have put into this!

I see on your screenshots that you have the person presence and alarm arming etc all on one line on the top. How can you do this? I tried to do this, but then it is not on one line:

title: Example
button_card_templates: !include_dir_merge_named "/config/ui_lovelace_minihass/templates/" #path to your templates .yaml
views:
  - title: Home
    theme: MiniHass_Dark #Theme you want to activate
    cards:
      - type: "custom:button-card"
        template:
          - custom_card_header_people
        variables:
          entity1: person.raf
          init1: R
          entity2: person.christine
          init2: C
      - type: "custom:button-card"
        template:
          - custom_card_header_right
        variables:
          entity1: alarm_control_panel.alarmo
          icon1:
          entity2: input_boolean.theme_mode
          icon2: mdi:contrast-circle
      - type: "custom:button-card"
        entity: switch.christmas_lights_outdoors #specify the entity to switch on/off, e.g. a light
        template:
          - custom_card_light
        variables:
          light_name: Window
          light_label: Bedroom

Also, how do you handle navigation to other pages?

fredrikpersson92 commented 7 months ago

Thank you. You should use any kind of grid card for the layout. I personally use custom:layout-card with the dashboard in Panel Mode. That means the whole dashboard consists of just one card (the layout card) with the rest of them inside it. Ofc, there are a thousand others ways to do this, but that works best for me to ensure a responsive layout on all devices.