🌻 Lovelace UI • Minimalist

I have started but not finished yet

2 Likes

I dont understand how to use popup cards in UI-mode. Сan anyone help me?

Is possible to combine custom State within Welcome Car?

my code:

  - type: vertical-stack
    cards:

      - type: horizontal-stack
        cards:

          - type: custom:layout-card
            layout_type: grid
    
            layout_options:
              grid-template-columns: 1fr 1fr
              grid-template-rows: auto
              grid-gap: 0px 4px
              mediaquery:
                "(max-width: 450px)": 
                  grid-template-columns: 1fr
    
            cards:
              ##-- Welcome Card --##
              - type: 'custom:button-card'
                template: custom_card_paddy_welcome
                variables:
                  ulm_custom_card_paddy_welcome_time: sensor.time
              - type: horizontal-stack
                cards:
        
                  - type: custom:layout-card
                    layout_type: grid
            
                    layout_options:
                      grid-template-columns: 1fr 1fr
                      grid-template-rows: auto
                      grid-gap: 0px 4px
                      mediaquery:
                        "(max-width: 450px)": 
                          grid-template-columns: 1fr 1fr 1fr 1fr
            
                    cards:
                      - type: 'custom:button-card'
                        template: vertical_buttons_custom_state
                        variables:
                          state: home
                          color: green
                        entity: input_select.status_person
                        label: home
                        icon: 'mdi:home' 
                        
                      - type: 'custom:button-card'
                        template: vertical_buttons_custom_state
                        variables:
                          state: Work
                          color: purple
                        entity: input_select.status_person
                        label: Work
                        icon: 'mdi:factory'
                        
                      - type: 'custom:button-card'
                        template: vertical_buttons_custom_state
                        variables:
                          state: snooker
                          color: pink
                        entity: input_select.status_person
                        label: Play
                        icon: "mdi:billiards-rack"

                      - type: 'custom:button-card'
                        template: vertical_buttons_custom_state
                        variables:
                          state: not_home
                          color: yellow
                        entity: input_select.status_person
                        label: Away
                        icon: "mdi:run" 

Hi, can you share this template: template: vertical_buttons_custom_state?

Is part of the UI minimalist, under the file button_card_templates.yaml

If you do not find, I will share

The buttons wont show in the dashboard. This is my code.

      - type: horizontal-stack
        cards:
         
          - type: custom:layout-card
            layout_type: grid
            
            layout_options:
              grid-template-columns: 1fr 1fr
              grid-template-rows: auto
              grid-gap: 0px 4px
              mediaquery:
                "(max-width: 450px)": 
                  grid-template-columns: 1fr 1fr 1fr 1fr
            
              cards:
                - type: 'custom:button-card'
                  template: vertical_buttons_custom_state
                  variables:
                    state: on
                    color: green
                  entity: scene.avond1
                  label: Avond1
                  icon: 'mdi:home' 

                - type: 'custom:button-card'
                  template: vertical_buttons_custom_state
                  variables:
                    state: on
                    color: green
                  entity: scene.avond1
                  label: Avond
                  icon: 'mdi:home' 

:wink:

I use that template. but some how it wont show up in the ui…

I implemented that card yesterday, but had also some challenges. The color were not shown and I were also not able to to switch the scene off… Here my code - as next enhancement the color could be used as variable :wink:

    vertical_buttons_custom_state:
      template: "vertical_buttons"
      variables:
        state: "on"
        # blue, red, green, yellow, purple, pink
        color: "green"
      show_last_changed: false
      name: "[[[ return variables.state ]]]"
      styles:
        name:
          - text-transform: "capitalize"
      state:
        - operator: "template"
          value: "[[[ return entity.state == variables.state ]]]"
          styles:
            icon:
              - color: "[[[ return `rgba(var(--color-${variables.color}), 1)`; ]]]"
            label:
              - color: "[[[ return `rgba(var(--color-${variables.color}-text), 1)`; ]]]"
            name:
              - color: "[[[ return `rgba(var(--color-${variables.color}-text), 1)`; ]]]"
            img_cell:
              - background-color: "[[[ return `rgba(var(--color-${variables.color}), 0.2)`; ]]]"
            card:
              - background-color: "[[[ return `rgba(var(--color-background-${variables.color}), var(--opacity-bg))`; ]]]"
      tap_action:
        action: "call-service"
        service: "input_select.select_option"
        service_data:
          entity_id: "[[[ return entity.entity_id ]]]"
          option: >
            [[[
              if (entity.state == 'on') {
                return 'off';
              } else if (entity.state == 'off') {
                return 'on';
              }
            ]]]```

Can you please open a bug report on GitHub with some Screenshots and code examples.
Ist’s hard to track such issues inside a forum thread.

1 Like

In your template you work with the entity itself not with a variable. So try:

- type: custom:button-card
  template: vacuum
  entity: vacuum.vacuum
  variables:
    name: vacuum abeksis

Don’t know if name is the name property of the custom:button-card or a custom variable. When you wish to pass the entity as a variable you have to get the state like this: states[variables.entity].state

How do you changed the card th show the temperature? Can you share your code pls? :slight_smile:


Anyone want to help build a calendar card ? Was thinking of something like this.

7 Likes

Looks really nice, but is it possible to get more then 1 next event from a calendar entity? :thinking:
I looked into this once, but could not figure it out :frowning:

Looks like GitHub - totaldebug/atomic-calendar-revive: Custom calendar card for Home Assistant with Lovelace does. But might be better to just adjust to this card?

Okey, I looked into this quickly and the card does a call to the backend:

this.hass.callApi('GET', `calendars/${entity.entity}?start=${start}Z&end=${end}Z`)

And then processes the result.

So the more easy option would indeed be to adjust the card :+1:

1 Like

that wil be nice! maybe in combination with the welcome card

do you have the yaml code and template?

No, Its a card I miss and it needs to be developed.

how do you create this card?