šŸŒ» Lovelace UI ā€¢ Minimalist

Hello, could you share your card code with me?

I tried to apply it and it looks like this :frowning:

image

Hey, I am trying to add paddy welcome

# Button cards location
button_card_templates: !include_dir_merge_named "../../custom_components/ui_lovelace_minimalist/__ui_minimalist__/ulm_templates/"


title: "Minimalist"
theme: "minimalist-desktop"
views:
  - title: Home
    path: home
    icon: mdi:home
    cards:
     - type: grid
       columns: 1
       square: false
       cards:
          - type: horizontal-stack
            cards:
              - type: custom:button-card
                template: edge
              - type: custom:button-card
                template: custom_card_paddy_welcome_with_weather
                variables:
                  ulm_custom_card_paddy_welcome_time: sensor.time
                  ulm_custom_card_paddy_welcome_weather_provider: weather.accu_weather
              - type: custom:button-card
                template: edge

but this gives empty view for some reason. Any ideas?

Hello, you need to use the whole code :

card_media_player_sonos:
  size: "20px"
  show_icon: true
  show_entity_picture: false
  show_state: false
  show_name: true
  template:
    - "green_playing"
    - "icon_info_bg"
    - "custom_ulm_language_variables"
  label: |
    [[[
        if (entity.state == 'idle'){
          return variables.ulm_media_player_off;
        }
        if (entity.state == 'paused'){
          return variables.ulm_media_player_pause;
        }
        if (entity.state == 'playing'){
          return variables.ulm_media_player_on  + ' ā€¢ ' +  ( Math.round(entity.attributes.volume_level / 0.01)) + '%';
        }
        if (entity.state == 'unavailable'){
          return variables.ulm_media_player_unavailable;
        }
        if (entity.state == 'off'){
          return variables.ulm_media_player_off;
        }        
    ]]]


card_media_player_sonos_with_controls:
  variables:
    ulm_card_media_player_with_controls_name: "No name set"
  triggers_update:
    - "[[[ ulm_card_media_player_with_controls_entity ]]]"
  styles:
    grid:
      - grid-template-areas: '"item1" "item2" "item3"'
      - grid-template-columns: "1fr"
      - grid-template-rows: "min-content  min-content"
      - row-gap: "12px"
    card:
      - border-radius: "var(--border-radius)"
      - box-shadow: "var(--box-shadow)"
      - padding: "12px"


  custom_fields:
    item1:
      card:
        type: "custom:button-card"
        template:
          - "ulm_language_variables"
          - "card_media_player_sonos"
        tap_action:
          action: "more-info"
        entity: "[[[ return variables.ulm_card_media_player_with_controls_entity ]]]"
        name: "[[[ return variables.ulm_card_media_player_with_controls_name ]]]"
        styles:
          card:
            - box-shadow: "none"
            - padding: "0px"
    item2:
      card:
        type: "custom:button-card"
        template: "list_4_items"
        custom_fields:
          item1:
            card:
              type: "custom:button-card"
              template: "widget_icon"
              entity: "[[[ return variables.ulm_card_media_player_with_controls_entity ]]]"
              tap_action:
                action: "call-service"
                service: "media_player.media_play_pause"
                service_data:
                  entity_id: "[[[ return variables.ulm_card_media_player_with_controls_entity ]]]"
              icon: "mdi:pause"
              state:
                - value: "paused"
                  icon: "mdi:play"
                - value: "off"
                  icon: "mdi:play"                
          item2:
            card:
              type: "custom:button-card"
              template: "widget_icon"
              tap_action:
                action: "call-service"
                service: "media_player.media_next_track"
                service_data:
                  entity_id: "[[[ return variables.ulm_card_media_player_with_controls_entity ]]]"
              icon: "mdi:skip-next"
          item3:            
            card:
              type: "custom:button-card"
              template: "widget_icon"
              tap_action:
                action: "call-service"
                service: "media_player.volume_down"
                service_data:
                  entity_id: "[[[ return variables.ulm_card_media_player_with_controls_entity ]]]"
              icon: "mdi:volume-minus"
          item4:
            card:
              type: "custom:button-card"
              template: "widget_icon"
              tap_action:
                action: "call-service"
                service: "media_player.volume_up"
                service_data:
                  entity_id: "[[[ return variables.ulm_card_media_player_with_controls_entity ]]]"
              icon: "mdi:volume-plus"

    item3:
      card:
        type: "custom:button-card"
        template: "custom_list_5_items"
        custom_fields:
          item1:         
            card:
              type: "custom:button-card"
              template: "widget_icon"
              tap_action:
                action: call-service
                service: media_player.play_media
                service_data:
                  entity_id: "[[[ return variables.ulm_card_media_player_with_controls_entity ]]]"
                  media_content_id: 'http://streaming.radio.rtl2.fr/rtl2-1-44-128'
                  media_content_type: music
              custom_fields:
                i: |
                  <img width= 90% src='/local/icon_radio/RadioRTL2.png'>

          item2:         
            card:
              type: "custom:button-card"
              template: "widget_icon"
              tap_action:
                action: call-service
                service: media_player.play_media
                service_data:
                  entity_id: "[[[ return variables.ulm_card_media_player_with_controls_entity ]]]"
                  media_content_id: 'https://ais-live.cloud-services.paris:8443/rfm.mp3'
                  media_content_type: music
              custom_fields:
                i: |
                  <img width= 90% src='/local/icon_radio/RadioRFM.png'>
          item3:         
            card:
              type: "custom:button-card"
              template: "widget_icon"
              tap_action:
                action: call-service
                service: media_player.play_media
                service_data:
                  entity_id: "[[[ return variables.ulm_card_media_player_with_controls_entity ]]]"
                  media_content_id: 'https://ais-live.cloud-services.paris:8443/virgin.mp3'
                  media_content_type: music
              custom_fields:
                i: |
                  <img width= 90% src='/local/icon_radio/RadioVirgin.png'>               
          item4:         
            card:
              type: "custom:button-card"
              template: "widget_icon"
              tap_action:
                action: call-service
                service: media_player.play_media
                service_data:
                  entity_id: "[[[ return variables.ulm_card_media_player_with_controls_entity ]]]"
                  media_content_id: 'http://cdn.nrjaudio.fm/audio1/fr/30201/mp3_128.mp3?origine=fluxradios'
                  media_content_type: music
              custom_fields:
                i: |
                  <img width= 90% src='/local/icon_radio/RadioCherieFM.png'>
          item5:         
            card:
              type: "custom:button-card"
              template: "widget_icon"
              tap_action:
                action: call-service
                service: spotcast.start
                service_data:
                  entity_id: "[[[ return variables.ulm_card_media_player_with_controls_entity ]]]"
                  uri: "spotify:playlist:6sCtuHWjGDBjY3tPGu3bOo"
                  shuffle: true
                  random_song: true                  
              custom_fields:
                i: |
                  <img width= 90% src='/local/icon_radio/Spotify2.png'>

icon_info_bg_sonos:
  color: "var(--google-grey)"
  show_icon: true
  show_label: true
  show_name: true
  state:
    - value: "unavailable"
      styles:
        custom_fields:
          notification:
            - border-radius: "50%"
            - position: "absolute"
            - left: "3px"
            - top: "8px"
            - height: "18px"
            - width: "18px"
            - font-size: "12px"
            - line-height: "14px"
            - background-color: >
                [[[
                  return "rgba(var(--color-red),1)";
                ]]]
  styles:
    icon:
      - color: "rgba(var(--color-theme),0.2)"
    label:
      - justify-self: "start"
      - align-self: "start"
      - font-weight: "bold"
      - font-size: "12px"
      - filter: "opacity(40%)"
      - margin-left: "12px"
    name:
      - align-self: "end"
      - justify-self: "start"
      - font-weight: "bold"
      - font-size: "14px"
      - margin-left: "12px"
    state:
      - justify-self: "start"
      - align-self: "start"
      - font-weight: "bold"
      - font-size: "12px"
      - filter: "opacity(40%)"
      - margin-left: "12px"
    img_cell:
      - background-color: "rgba(var(--color-theme),0.05)"
      - border-radius: "50%"
      - place-self: "center"
    grid:
      - grid-template-areas: "'i n' 'i l'"
      - grid-template-columns: "min-content auto"
      - grid-template-rows: "min-content min-content"
    card:
      - border-radius: "var(--border-radius)"
      - box-shadow: "var(--box-shadow)"
      - padding: "12px"
  size: "20px"

green_playing:
  state:
    - styles:
        icon:
          - color: "rgba(var(--color-green),1)"
        img_cell:
          - background-color: "rgba(var(--color-green), 0.2)"
      value: "playing"

because templates are needed.

and here is the code in view :

          - type: custom:button-card
            template: card_media_player_sonos_with_controls
            variables:
              ulm_card_media_player_with_controls_name: "Your_name"
              ulm_card_media_player_with_controls_entity: media_player.your_entity
2 Likes

Please share your code!
Really like the cards you made!

For the benefit of all the community Iā€™m in the process of uploading the cards to github, but is not an easy one. You can check in the custom folder section. They will show up as soon as they pass all the requirements. All my cards will start with custom_cards_irmajaviā€¦

4 Likes

@irmajavi
Thatā€™s great! Let us know where we can find them as soon as uploading is complete.

Try Ctrl + F5 :slight_smile:

No change. I added more cards to see if they are working, now the code is this:

# Button cards location
button_card_templates: !include_dir_merge_named "../../custom_components/ui_lovelace_minimalist/__ui_minimalist__/ulm_templates/"


title: "Minimalist"
theme: "minimalist-desktop"
views:
  - title: Home
    path: home
    icon: mdi:home
    cards:
     - type: grid
       columns: 1
       square: false
       cards:
          - type: horizontal-stack
            cards:
              - type: custom:button-card
                template: edge
              - type: 'custom:button-card'
                template: card_person
                variables:
                  ulm_card_person_entity: person.jiri_prochazka
                  ulm_card_person_use_entity_picture: true
                  ulm_card_person_zone1: zone.tl
              - type: custom:button-card
                template: edge
              - type: custom:button-card
                template: edge
              - type: 'custom:button-card'
                template: card_person
                variables:
                  ulm_card_person_entity: person.radka_pragrova
                  ulm_card_person_use_entity_picture: true
                  ulm_card_person_zone1: zone.jota
              - type: custom:button-card
                template: edge
          - type: horizontal-stack
            cards:
              - type: custom:button-card
                template: edge
              - type: custom:button-card
                template: custom_card_paddy_welcome_with_weather
                variables:
                  ulm_custom_card_paddy_welcome_time: sensor.time
                  ulm_custom_card_paddy_welcome_weather_provider: weather.pragrhouse
              - type: custom:button-card
                template: edge

the whole paddy welcome is still unvisible :confused:

Pfff, Iā€™m trying to recreate the cards myself but I donā€™t think I can pull that off.
Really want the vacuum card (first page) and electricity card (last page).
Someone who can help me?

I think itā€™s a markdown loading issue.

You should try putting an invisible markdown card above the welcome card :

      - type: "markdown"
        content: "!"
        card_mod:
        style: |
          ha-card {
            display: none;
          }

I have spent some time setting up my interface and everything is coming along well.
I just wonder if someone could help me with the ā€œchip_navigateā€. In the documentation it shows the chip with an icon as well as a title e.g. ā€œliving roomā€.

However, I have no idea how to add the actual title to the card as shown in the picture. Do i need to make a custom card which includes the title or am i missing something?

There should probably be a better more ā€œofficialā€ way to do this but I got it to work by using the following code:

      - type: "custom:button-card"
        template: chip_navigate
        variables:
          ulm_chip_navigate_path: /ui-lovelace-minimalist/0
          ulm_chip_navigate_icon: mdi:sofa
        label: "Living Room"
        styles:
          grid:
          - grid-template-areas: "'i l'"
1 Like

Thanks!
I have been at it for over an hour and just couldnā€™t figure this out!

Thanks!

1st Congrats on the development

Pardon for the uiminimalist newbie question.
I am quite experienced with HA and Lovelace but I cannot figure out how to use custom_cards
For example:
I have copied the custom_card_input_datetime.yaml from GitHub into a folder with the same name custom_card_input_datetime in the custom_card folder under the config/ui_lovelace_minimalist/custom_card

I have reloaded through config-settings reload yaml, even restarted but I keep getting an error on the ui of
button_card template ā€œcard_input_datetimeā€ missing.
What do I miss in the setup?

could there be some missing binding of directories?

Thanks in advance for your help :slight_smile:

Hello!

I love your card! did you manage to fix it so that it looks more like your old card?

Yes, that was it! Thank you.

1 Like

Hello !

After some time tweaking it, I landed on a version that suited me enough :

image

Let me know if you need the code :wink:

5 Likes

always good to share code. Someone might come across this and would like to have it the way you did it as well.

I am going to try this template soon myself so who knows :stuck_out_tongue:

could you please share your code!

What sensors are you using for noise meter?