🌻 Lovelace UI • Minimalist

Hi Everyone.

The dashboard is overall working pretty good for me, but I face with the issue that several times per day I suddenly get the following error


I tells me that the button card doesn not exists, and when I refresh the page like 10 times, it will work again fine.

THis same error I get on my phone, where I need to open & close the application several times for it to work again.

Anybnody that has any idea how I can stop this from happening?

1 Like

I actually came here to ask about the exact same issue so glad I’m not alone. This only seems to happen on my phone and tablet

Card mod just released an improvment related to Home Assistant 2022.03 stability.
Did you updated it?

I also had this problem, I solved it by stopping the close session function after 5 min from the user profile.

1 Like

Does Aussie BB expose those information to HA? I wish Optus and other providers does :exploding_head::pleading_face:
Now that I know you are from Aussie, any luck integrating your smart electricity meter to HA? :sweat_smile:

Yeah got lucky choosing Aussie BB it seems :slight_smile: no smart meter at my place sorry, am using my solar and smart plugs all over the place for as many measurements as I can

1 Like

@benm7, do you mean like this?

4 Likes

Woah, yeah exactly! Maybe a tad smaller but keen to see how you did it so I can play around with the size :slight_smile:

You can just define this in the grid, it’s just that simple to change the 40% 60% to 30% 70% (like it now is). Anyway, i changed the code allot to match a more streamlined card & config code. Soon as i’m finished i will share it back to you.

The card code will now look like this (just like the welcome card we did). So if there is no icon defined it will return the attribute icon, if no name defined it will return the friendly_name and if no color defined it will choose a random color.

        template: radial_icon_info
        variables:
          entity_1:
            entity_id: sensor.processor_use_percent
            icon: ''
            name: CPU
            color: green
          entity_2:
            entity_id: sensor.processor_temperature
            icon: ''
            name: TEMP
            color: red
          entity_3:
            entity_id: sensor.memory_use_percent
            icon: ''
            name: RAM
            color: yellow```
1 Like

Hi,
In my opinion this is the coolest theme and I would love to start using the UI-Minimalist theme, however, what is the way to convert my PNG files to MDI icons so the experience won’t change for the household. Below some of my screens:
Thanks in advance












1 Like

Thanks! Adapted that and works perfectly!

Hi, can you please share working code?
thanks.

yes, absolutely!

So for the label portion of the card, this is what it currently looks like and the code to go with it further below:

image

  label: |-
    [[[
      if (variables.room_card_label) {
        var bri = Math.round(states[variables.lighting].attributes.brightness / 2.55);

        return  '<ha-icon icon="mdi:thermometer" style="width: 16px; height: 16px;"></ha-icon>' + (entity.attributes.current_temperature || entity.attributes.temperature || entity.state || '-') + '°C' + ' | ' 
        + '<ha-icon icon="mdi:lightbulb-outline" style="width: 18px; height: 18px;"></ha-icon>' + (entity.attributes.brightness || bri || '-') + '%' + ' | '
        + '<ha-icon icon="mdi:ph" style="width: 16px; height: 16px;"></ha-icon>' + (states[variables.ph].state || '-') + ' | '
        + '<ha-icon icon="mdi:flask" style="width: 16px; height: 16px;"></ha-icon>' + (states[variables.salinity].state || '-') + ' | '
        + '<ha-icon icon="mdi:flash" style="width: 16px; height: 16px;"></ha-icon>' + (states[variables.power_consumption].state) + 'W';

      } else if (entity.state == "on") {
          return variables.ulm_on
      } else if (entity.state == "off") {
          return variables.ulm_off
      } else {
        return entity.state
      }
    ]]]

The card with all the entities that I pass to it:

          - type: 'custom:button-card'
            template: custom_card_room
            name: ' '
            entity: climate.reef
            variables:
              ph: 'sensor.reef_ph'
              salinity: 'sensor.reef_salinity'
              lighting: 'light.lights_bsmt_media_rm'
              power_consumption: 'sensor.reef_powerbar_current_consumption'
              image_path: '/local/reef.jpg'
              entity_1:
                entity_id: binary_sensor.reef_lighting
                templates:
                  - yellow_on
                  - grey_off
              entity_5:
                entity_id: script.feed_mode
                templates:
                  - green_on
                  - grey_off
                tap_action:
                  action: toggle
              entity_6:
                entity_id: binary_sensor.sump_running
                templates:
                  - yellow_on
                  - grey_off
              entity_7:
                entity_id: binary_sensor.ato_running
                templates:
                  - blue_on
                  - grey_off
              entity_8:
                entity_id: binary_sensor.heater_running
                templates:
                  - red_on
                  - grey_off

could you show me how to replace the background images of each card? I would like to the same thing with this custom room card. I’m not a coder, could you show me an example? very nice design that you have.

Thanks

hi,

do you mean the room card I have made?
if so, that is taken care of by variable for the image url. (room_card_image_path:)
you have to put right image address in your ui card code.

hope this helps!

Wondering if someone could help with a custom button card (not from the Lovelace UI Minimalist theme) and make some adjustments to it to make it more consistent with this theme?

I don’t even know who to give credit for the card because it was quite a while ago when I borrowed and made adjustments to it. Kudos to the original creator of the card whom I have made my edits to achieve the below:

image

I’m trying to get the bottom card look less out of place in this theme and make it resemble the mini graph card on the top of the picture below. Would appreciate help modifying the code further below:

image

sbc_rpi:
  template:
    - "icon_info"
  color: "var(--google-grey-500)"
  triggers_update: "all"
  styles:
    card:
      - font-size: 12px
      - border-radius: "var(--border-radius)"
      - box-shadow: "var(--box-shadow)"
      - padding: "10%"
    icon:
      - color: |
          [[[
            if (entity.state < 60) return 'gray';
            if (entity.state >= 60 && entity.state < 80) return 'orange';
            else return 'red';
          ]]]
      - width: 70%
      - margin-top: '-10%'
    name:
      - justify-self: "start"
      - align-self: "start"
      - font-weight: "bolder"
      - font-size: "12px"
      - filter: "opacity(40%)"
      - padding-bottom: "0px"
    grid:
      - grid-template-areas: "'i item0' 'i n' 'item1 item1' 'item2 item2' 'item3 item3'"
      - grid-template-columns: "1fr 1fr"
      - grid-template-rows: "1fr min-content min-content min-content min-content"
    img_cell:
      - justify-content: "start"
      - align-items: "start"
      - margin: "none"
    custom_fields:
      item0:
        - align-self: "start"
        - justify-self: "end"
      item1:
        - align-self: "middle"
        - justify-self: "start"
        - padding-bottom: "2px"
        - font-size: "10px"
        - filter: "opacity(100%)"
        - '--text-color-sensor': >-
            [[[ if (states[variables.device_entity_1].state > 50)
            return "red"; ]]]
      item2:
        - align-self: "middle"
        - justify-self: "start"
        - padding-bottom: "2px"
        - font-size: "10px"
        - filter: "opacity(100%)"
        - '--text-color-sensor': >-
            [[[ if (states[variables.device_entity_2].state > 75)
            return "red"; ]]]
      item3:
        - align-self: "middle"
        - justify-self: "start"
        - font-size: "10px"
        - filter: "opacity(100%)"
        - '--text-color-sensor': >-
            [[[ if (states[variables.device_entity_3].state > 50)
            return "red"; ]]]

  custom_fields:
    item0: |
      [[[
        return `<ha-icon
          icon="mdi:thermometer"
          style="width: 12px; height: 12px; color: gray;">
          </ha-icon><span>${entity.state}°C</span>`
      ]]]
    item1: |
      [[[
        return `<ha-icon
          icon="mdi:cpu-64-bit"
          style="width: 12px; height: 12px; color: '#03A9F4';">
          </ha-icon><span>CPU: <span style="color: var(--text-color-sensor);">${states[variables.device_entity_1].state}%</span></span>`
      ]]]
    item2: |
      [[[
        return `<ha-icon
          icon="mdi:chip"
          style="width: 12px; height: 12px; color: '#03A9F4';">
          </ha-icon><span>RAM: <span style="color: var(--text-color-sensor);">${states[variables.device_entity_2].state}%</span></span>`
      ]]]
    item3: |
      [[[
        return `<ha-icon 
          icon="mdi:micro-sd"
          style="width: 12px; height: 12px; color: '#03A9F4';">
          </ha-icon><span>DISK: <span style="color: var(--text-color-sensor);">${states[variables.device_entity_3].state}%</span></span>`
      ]]]
  - type: custom:button-card
    template: sbc_rpi
    entity: sensor.ad2pi_temperature
    variables:
      device_entity_1: sensor.ad2pi_cpu_usage
      device_entity_2: sensor.ad2pi_memory_use
      device_entity_3: sensor.ad2pi_disk_use
      device_entity_1_name: CPU
      device_entity_2_name: RAM
      device_entity_3_name: DISK
      device_entity_0_icon: mdi:thermometer
      device_entity_1_icon: mdi:cpu-64-bit
      device_entity_2_icon: mdi:chip
      device_entity_3_icon: mdi:micro-sd
    icon: mdi:raspberry-pi
    name: ad2pi
1 Like

yes, but where exactly do I put the variable ?

you have to put this in the card ui;

example code:

###### room card bedroom 1
  - type: horizontal-stack
    cards: 
      - type: 'custom:button-card'
        template: custom_card_room
        name: Bedroom 1
        entity: climate.thermostat_bedroom_1
        tap_action:
          action: navigate
          navigation_path: '/lovelace-myhome/011_bedroom_1_full'
        variables:  
          room_card_image_path: /local/images/bedroom_1.jpg     
          entity_1:
            entity_id: switch.area_presence_hold_bedroom_1
            templates:
              - green_on
            tap_action:
              action: toggle
#climate entity
          entity_5:
            entity_id: climate.thermostat_bedroom_1 
#            icon: mdi:power # off state          
            templates:
              - red_on                         
            tap_action:
              action: call-service
              service: script.off_auto_heat
              data: "this.entity_id"  
# END climate entity
          entity_6:
            entity_id: light.hanging_lamp_bedroom_1
            templates:
              - yellow_on
            tap_action:
              action: toggle
          entity_7:
            entity_id: light.standing_lamp_bedroom_1
            templates:
              - yellow_on
            tap_action:
              action: toggle
          entity_8:
            entity_id: light.bedroom_1_lights
            templates:
              - pink_on
            tap_action:
              action: toggle  

Thanks Virgil, I can’t seem to find that setting would you be able to share a screenshot?

hi all,

this is my take on thermostat card!
any suggestions are welcome!

20 Likes