🌻 Lovelace UI • Minimalist

Hi @Freshhat

Can you confirm browser_mod is installed ?

Sure it‘s installed using it heavily for some of my automations

Any idea how i could debug why no popup is opening?

When using the pop up code nothing happens


- type: "custom:button-card"
  template:
    - card_light
    - popup_light
  entity: light.cuisine

I changed the entity to a few different lights but no pop up

And thank you everyone for the awesome work!

1 Like

@Freshhat @mbadsey

Your configuration seems to be correct.

Can you try to clear your browser cache ?
Can you have a look to Dev console on your web browser (F12) and see if you have error message ?

Last solution, download again Minimalist theme from GitHub and put it in a new folder. Just update the inclusion in your yaml file. On my configuration, sometimes it doesn’t work to overwrite files.

@schumijo,

in my case I have this strange output

the light “light.lumiere_salon” is a group of 4 lights.


type: custom:button-card
template:
  - card_light
  - popup_light
entity: light.lumiere_salon
icon: mdi:sofa
name: Salon

Last question, where can I find “slider-card” ?

Thanks

@schumijo
You might need to do a hotfix of our popup card.

The slider-card was moved to a new repository. From here to here.
I’m using the new repository but I’m guessing your part of the popup is using the old slider.

@laurentdb
A temporary solution could be to install both cards for now.

@bms thanks for your reply.

The new repository is using

type: custom:my-slider

and the popup template is using

type: custom:slider-card

And I think so that’s why I can’t find it.

The temporary hot fix didn’t solved my issue :frowning: I still those 4 big circles instead of one…
The definition of the light is like this:

light:
  - platform: group
    name: Lumiere salon
    entities:
      - light.salon1
      - light.salon2
      - light.salon3
      - light.salon4

Maybe I am doing wrong.

@bms
Thank you for the PR

@laurentdb New version 1.0.0-beta10-hotfix released

Should solve slider card new repository and light group display.

1 Like

What is required to get the popup card working? I have complete reinstall the UI, clean my caches but still the popup is not opening. I have tried both for light and and a power outlet/switch.

      - type: "custom:button-card"
        template:
          - card_light
          - popup_light
        entity: light.slaapkamer

      - type: "custom:button-card"
        template:
          - card_power_outlet
          - popup_power_outlet
        variables:
          ulm_card_power_outlet_consumption_sensor: sensor.elektrischdeken_energy
          ulm_popup_power_outlet_sensor1: sensor.elektrischdeken_energy
          ulm_popup_power_outlet_sensor2: sensor.elektrischdeken_energy
          ulm_popup_power_outlet_graph_sensor: sensor.elektrischdeken_energy
        entity: switch.elektrischdeken
        name: Test

You need to install the browser_mod

Can I add the same lights to multiple light groups?

Only one way to find out :sweat_smile:

I don’t know

It works like a charm! thanks

@schumijo

Thanks for all your suggestions, tried it today with your hotfix + reinstalling everything in a new folder. As then also nothing was showing i debugged it in the Browser Console and found out that it’s referring to a line inside button_card.js and after checking this further i found out that with my second Dashboard (Dwains Dashboard) the custom button card from HACS will be overwritten. So i removed this somehow outdated button card from the dwains_dashboard installation folder.

Now everything is working like a charm.

Thanks :slight_smile:

1 Like

Any ideas why the tv icon is not showing on mobile?
Also the lightbulb is not in the same position as on desktop.

BTW: Thanks for the awesome work!

1 Like

Is this the view of the companion app or your default webbrowser (desktop/smartphone)? It seems there is a rendering issue. Noticed it with an early version of android 12 after an update of the webview / browser component it got fixed. So first see if you can update your system/app/browser and try again.

Readme updated with all requirements :wink:

3 Likes

Its the companion app on iOS iPhone 12 Pro Max.

Ah, ok. Seems webkit ignores for some reason the justify-self property. Like I said I had that problem with chrome on android 12 , too. After an update it was rendered correctly. I wish I could fix it but I have no apple device in my hands. :\

I am trying to create a custom garage door cover card.
I have a sensor that node red-updates when the door is open with the minutes until auto-close
I wanted to display this countdown on the state line of the button instead of the word “open”.

I’m defining the sensor as a variable in the lovelace yaml file, but I cannot figure out how to access the sensor from within the template functions; it keeps throwing an undefined error.

I probably have a variable scope issue, but I’m just learning this and stumped - anyone see anything obvious?

W0

lovelace-minimalist.yaml

  - type: 'custom:button-card'
    template: card_cover_with_countdown
    variables:
      ulm_card_cover_with_countdown_name: "Dads Garage Door"
      ulm_card_cover_with_countdown_entity: "cover.garagedoor1"
      ulm_card_cover_with_countdown_countdown: "sensor.garagecountdown1_2"

In the code below, it works as expected if I replace

variables.ulm_card_cover_with_countdown_countdown
with
‘sensor.garagecountdown1_2’

W1

  label: >-
    [[[
        var icon = 'mdi:help-circle';
        var countdown = '?';
        var countdown = states[variables.ulm_card_cover_with_countdown_countdown].state;

        if (typeof states[entity.entity_id].attributes.current_position === 'undefined'){
          if (states[entity.entity_id].state == 'closed'){
            return variables.ulm_closed;
          } else
            return countdown + ' m/close';
        } else {
          if (states[entity.entity_id].attributes.current_position == 0){
            return variables.ulm_closed;
          } else {
            return (countdown ? countdown : '0') + ' m/close';
          }
        }
        return icon ;
    ]]]

The full yaml of the new templates are below
(based from cover: and card_cover_with_buttons:)

cover_countdown:
  tap_action:
    action: more-info
  icon: |
    [[[
        var icon = 'mdi:help-circle';
        if (typeof states[entity.entity_id].attributes.current_position === 'undefined'){
          if (states[entity.entity_id].state == 'closed'){
            var icon = 'mdi:window-shutter';
          } else
            var icon = 'mdi:window-shutter-open';
        } else {
          if (states[entity.entity_id].attributes.current_position == 0){
            var icon = 'mdi:window-shutter';
          } else
            var icon = 'mdi:window-shutter-open';
        }
        return icon ;
    ]]]
  label: >-
    [[[
        var icon = 'mdi:help-circle';
        var countdown = '?';
        var countdown = states[variables.ulm_card_cover_with_countdown_countdown].state;

        if (typeof states[entity.entity_id].attributes.current_position === 'undefined'){
          if (states[entity.entity_id].state == 'closed'){
            return variables.ulm_closed;
          } else
            return countdown + ' m/close';
        } else {
          if (states[entity.entity_id].attributes.current_position == 0){
            return variables.ulm_closed;
          } else {
            return (countdown ? countdown : '0') + ' m/close';
          }
        }
        return icon ;
    ]]]
  state:
    - operator: template
      value: "[[[ return states[entity.entity_id].attributes.current_position != 0; ]]]"
      styles:
        icon:
          - color: "rgba(var(--color-blue),1)"
        img_cell:
          - background-color: "rgba(var(--color-blue),0.2)"


card_cover_with_countdown:
  variables:
    ulm_card_cover_with_countdown_name: "n/a"
  triggers_update:
    - "[[[ variables.ulm_card_cover_with_countdown_entity ]]]"
    - "[[[ variables.ulm_card_cover_with_countdown_countdown ]]]"
  styles:
    grid:
      - grid-template-areas: '"item1" "item2"'
      - 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:
          - icon_info
          - ulm_language_variables
          - cover_countdown
        tap_action:
          action: more-info
        entity: '[[[ return variables.ulm_card_cover_with_countdown_entity ]]]'
        name: '[[[ return variables.ulm_card_cover_with_countdown_name ]]]'
    item2:
      card:
        type: 'custom:button-card'
        template: list_items
        custom_fields:
          item1:
            card:
              type: 'custom:button-card'
              template: widget_icon
              tap_action:
                action: call-service
                service: cover.close_cover
                service_data:
                  entity_id: '[[[ return variables.ulm_card_cover_with_countdown_entity ]]]'
              icon: 'mdi:arrow-down'
          item2:
            card:
              type: 'custom:button-card'
              template: widget_icon
              tap_action:
                action: call-service
                service: cover.stop_cover
                service_data:
                  entity_id: '[[[ return variables.ulm_card_cover_with_countdown_entity ]]]'
              icon: 'mdi:pause'
          item3:
            card:
              type: 'custom:button-card'
              template: widget_icon
              tap_action:
                action: call-service
                service: cover.open_cover
                service_data:
                  entity_id: '[[[ return variables.ulm_card_cover_with_countdown_entity ]]]'
              icon: 'mdi:arrow-up'