🌻 Lovelace UI • Minimalist

The pollen card is based on data I get from Tado, based on a variation of this post:

I converted the values for today, tomorrow and the day after to values ranging 0-100. For the popup I use the original one with textual states, but you yould also put the percentage one there:

    - type: horizontal-stack
      cards:
        - type: "custom:button-card"
          template: card_pollen
          entity: sensor.air_pollen_level_grass
          variables:
            ulm_card_pollen_entity: sensor.air_pollen_value_grass
            ulm_card_pollen_tomorrow_entity: sensor.air_pollen_value_grass_tomorrow
            ulm_card_pollen_d_a_tomorrow_entity: sensor.air_pollen_value_grass_d_a_tomorrow
        - type: "custom:button-card"
          template: card_pollen
          entity: sensor.air_pollen_level_weed
          variables:
            ulm_card_pollen_entity: sensor.air_pollen_value_weed
            ulm_card_pollen_tomorrow_entity: sensor.air_pollen_value_weed_tomorrow
            ulm_card_pollen_d_a_tomorrow_entity: sensor.air_pollen_value_weed_d_a_tomorrow
        - type: "custom:button-card"
          template: card_pollen
          entity: sensor.air_pollen_level_tree
          variables:
            ulm_card_pollen_entity: sensor.air_pollen_value_tree
            ulm_card_pollen_tomorrow_entity: sensor.air_pollen_value_tree_tomorrow
            ulm_card_pollen_d_a_tomorrow_entity: sensor.air_pollen_value_tree_d_a_tomorrow
card_pollen:
  show_icon: false
  show_entity: false
  show_label: false
  show_name: false
  triggers_update: "all"
  styles:
    card:
      - border-radius: "var(--border-radius)"
      - box-shadow: "var(--box-shadow)"
      - padding: "0px"
    grid:
      - grid-template-areas: "'item1 item2'"
      - grid-template-columns: "min-content auto"
      - grid-template-rows: "1fr"
  custom_fields:
    item1:
      card:
        entity: "[[[ return entity == null ? variables.ulm_card_pollen_entity : entity.entity_id ]]]"
        show_label: false
        template:
          - "icon_only"
        styles:
          icon:
            - color: "rgba(var(--color-theme),0.9)"
          card:
            - box-shadow: none
            - padding: "0 12px"
        type: "custom:button-card"
    item2:
      card:
        type: "custom:button-card"
        template: "list_3_items"
        styles:
          card:
            - border-radius: "14px"
            - padding: "12px 12px 12px 0"
          grid:
            - column-gap: "0px"
        custom_fields:
          item1:
            card:
              type: "custom:bar-card"
              direction: "up"
              height: "44px"
              positions:
                name: off
                value: off
                icon: off
                indicator: off
                minmax: off
              severity:
                - color: "#28950088"
                  from: 0
                  to: 20
                - color: "#f7d90088"
                  from: 20
                  to: 40
                - color: "#f89a0088"
                  from: 40
                  to: 60
                - color: "#ff990088"
                  from: 60
                  to: 80
                - color: "#d81700aa"
                  from: 80
                  to: 100
              entities:
                - entity: "[[[ return variables.ulm_card_pollen_entity == null ? entity.entity_id : variables.ulm_card_pollen_entity ]]]"
                  name: "-"
              style: |
                bar-card-background{
                  margin: 0px 0 0px 0 !important;
                  text-align: initial;
                }
                ha-card{
                  --bar-card-border-radius: 7px 0 0 7px;
                  border-radius: 0 7px 7px 0;
                  box-shadow: none;
                }
                #states{
                  padding: 0;
                }
          item2:
            card:
              type: "custom:bar-card"
              direction: "up"
              height: "44px"
              positions:
                name: off
                value: off
                icon: off
                indicator: off
                minmax: off
              severity:
                - color: "#28950088"
                  from: -1
                  to: 20
                - color: "#f7d90088"
                  from: 20
                  to: 40
                - color: "#f89a0088"
                  from: 40
                  to: 60
                - color: "#ff990088"
                  from: 60
                  to: 80
                - color: "#d81700aa"
                  from: 80
                  to: 101
              entities:
                - entity: "[[[ return variables.ulm_card_pollen_tomorrow_entity ]]]"
              style: |
                bar-card-background{
                  margin: 0px 0 0px 0 !important;
                  text-align: initial;
                }
                ha-card{
                  --bar-card-border-radius: 0;
                  border-radius: 0;
                  box-shadow: none;
                }
                #states{
                  padding: 0;
                }
          item3:
            card:
              type: "custom:bar-card"
              direction: "up"
              height: "44px"
              positions:
                name: off
                value: off
                icon: off
                indicator: off
                minmax: off
              severity:
                - color: "#28950088"
                  from: 0
                  to: 20
                - color: "#f7d90088"
                  from: 20
                  to: 40
                - color: "#f89a0088"
                  from: 40
                  to: 60
                - color: "#ff990088"
                  from: 60
                  to: 80
                - color: "#d81700aa"
                  from: 80
                  to: 100
              entities:
                - entity: "[[[ return variables.ulm_card_pollen_d_a_tomorrow_entity ]]]"
              style: |
                bar-card-background{
                  margin: 0px 0 0px 0 !important;
                  text-align: initial;
                }
                ha-card{
                  --bar-card-border-radius: 0 7px 7px 0;
                  border-radius: 0 7px 7px 0;
                  box-shadow: none;
                }
                #states{
                  padding: 0;
                }
3 Likes

This is my cover card. The block_entity variable you see is an optional window sensor. If that is open, I block the cover operations. The variable will show it in the gui, but does not actually block anything: this I do in my template cover itself:

    - type: "custom:button-card"
      template: card_motion_blind_my
      variables:
        ulm_card_motion_blind_my_name: Links
        ulm_card_motion_blind_my_entity: cover.keukengordijn_links
        ulm_card_motion_blind_my_perc: 53
card_motion_blind_my:
  triggers_update: "all"
  variables:
    ulm_card_motion_blind_my_perc: 50
    ulm_card_motion_large_slider: false
    ulm_card_motion_blind_my_name: ""
    ulm_card_motion_blind_my_blockentity: ""
  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: "14px"
  state:
    - operator: "template"
      value: "[[[ return states[variables.ulm_card_motion_blind_my_entity].state == 'open' ]]]"
      styles:
        card:
          - background-color: "rgba(var(--color-background-blue),var(--opacity-bg))"
  custom_fields:
    item1:
      card:
        type: "custom:button-card"
        template: "[[[ return (variables.ulm_card_motion_large_slider) ? 'list_two_third_items' : 'list_2_items' ]]]"
        styles:
          card:
            - border-radius: "14px"
        state:
          - operator: "template"
            value: "[[[ return states[variables.ulm_card_motion_blind_my_entity].state == 'open' ]]]"
            styles:
              card:
                - background-color: "rgba(var(--color-background-blue),0)"
        custom_fields:
          item1:
            card:
              type: "custom:button-card"
              template:
                - "icon_info"
                - "ulm_language_variables"
                - "motion_cover"
                - "blue_slider"
              entity: "[[[ return variables.ulm_card_motion_blind_my_entity ]]]"
              name: "[[[ return variables.ulm_card_motion_blind_my_name ]]]"
              icon: >
                [[[
                    var icon = "mdi:arrow-vertical-lock";
                    if (variables.ulm_card_motion_blind_my_blockentity == "" || states[variables.ulm_card_motion_blind_my_blockentity].state != "on") {
                      if (typeof states[variables.ulm_card_motion_blind_my_entity].attributes.current_position === "undefined") {
                        if (states[variables.ulm_card_motion_blind_my_entity].state == "closed") {
                          var icon = "mdi:blinds";
                        } else
                          var icon = "mdi:blinds-open";
                      } else {
                        if (states[variables.ulm_card_motion_blind_my_entity].attributes.current_position <= 99) {
                          var icon = "mdi:blinds";
                        } else
                          var icon = "mdi:blinds-open";
                      }
                    }
                    return icon;
                ]]]        
              styles:
                card:
                  - background-color: "rgba(var(--color-background-blue),0)"
              tap_action:
                action: "more-info"
              hold_action:
                action: "call-service"
                service: "cover.set_cover_position"
                service_data:
                  entity_id: "[[[ return variables.ulm_card_motion_blind_my_entity ]]]"
                  position: "[[[ return variables.ulm_card_motion_blind_my_perc ]]]"
          item2:
            card:
              type: "custom:my-slider"
              radius: "14px"
              height: "42px"
              entity: "[[[ return variables.ulm_card_motion_blind_my_entity ]]]"
              mainSliderColor: >-
                [[[
                  if (states[variables.ulm_card_motion_blind_my_entity].state == "unavailable") {
                    return "rgba(var(--color-grey),1)";
                  } else if (states[variables.ulm_card_motion_blind_my_entity].state == "closed"){
                    return "rgba(var(--color-grey),.05)";
                  } else if (variables.ulm_card_motion_blind_my_blockentity != "" && 
                              states[variables.ulm_card_motion_blind_my_blockentity].state == "on") {
                    return "rgba(var(--color-blue),0.5)";
                  } else
                    return "rgba(var(--color-blue),1)";
                ]]]
              secondarySliderColor: >-
                [[[
                  if (states[variables.ulm_card_motion_blind_my_entity].state == "unavailable" || 
                      states[variables.ulm_card_motion_blind_my_entity].state == "closed") {
                    return "rgba(var(--color-grey),0.05)";
                  } else
                    return "rgba(var(--color-blue),0.2)";
                ]]]
              mainSliderColorOff: "rgba(var(--color-theme),0.05)"
              secondarySliderColorOff: "rgba(var(--color-theme),0.05)"
              thumbHorizontalPadding: "0px"
              thumbVerticalPadding: "0px"
              thumbWidth: "0px"
              card_mod:
              style: |
                ha-card {
                  border-radius: 14px;
                  box-shadow: none;
                }
    item2:
      card:
        type: "custom:button-card"
        template: "list_4_items"
        styles:
          card:
            - border-radius: "14px"
        state:
          - operator: "template"
            value: "[[[ return states[variables.ulm_card_motion_blind_my_entity].state == 'open' ]]]"
            styles:
              card:
                - background-color: "rgba(var(--color-background-blue),0)"
        custom_fields:
          item1:
            card:
              type: "custom:button-card"
              template: "widget_icon"
              state:
                - operator: "template"
                  value: "[[[ return variables.ulm_card_motion_blind_my_blockentity != '' && 
                                      states[variables.ulm_card_motion_blind_my_blockentity].state == 'on' ]]]"
                  styles:
                    icon:
                      - opacity: "0.4"
              tap_action:
                action: "call-service"
                service: "cover.open_cover"
                service_data:
                  entity_id: "[[[ return variables.ulm_card_motion_blind_my_entity ]]]"
              icon: "mdi:arrow-up"
          item2:
            card:
              type: "custom:button-card"
              template: "widget_icon"
              state:
                - operator: "template"
                  value: "[[[ return variables.ulm_card_motion_blind_my_blockentity != '' && 
                                      states[variables.ulm_card_motion_blind_my_blockentity].state == 'on' ]]]"
                  styles:
                    icon:
                      - opacity: "0.4"
              tap_action:
                action: "call-service"
                service: "cover.stop_cover"
                service_data:
                  entity_id: "[[[ return variables.ulm_card_motion_blind_my_entity ]]]"
              icon: "mdi:pause"
              hold_action:
                action: "call-service"
                service: "cover.set_cover_position"
                service_data:
                  entity_id: "[[[ return variables.ulm_card_motion_blind_my_entity ]]]"
                  position: "[[[ return variables.ulm_card_motion_blind_my_perc ]]]"
          item3:
            card:
              type: "custom:button-card"
              template: "widget_icon"
              state:
                - operator: "template"
                  value: "[[[ return variables.ulm_card_motion_blind_my_blockentity != '' && 
                                      states[variables.ulm_card_motion_blind_my_blockentity].state == 'on' ]]]"
                  styles:
                    icon:
                      - opacity: "0.4"
              tap_action:
                action: "call-service"
                service: "cover.set_cover_position"
                service_data:
                  entity_id: "[[[ return variables.ulm_card_motion_blind_my_entity ]]]"
                  position: "[[[ return variables.ulm_card_motion_blind_my_perc ]]]"
              icon: "mdi:star"
          item4:
            card:
              type: "custom:button-card"
              template: "widget_icon"
              state:
                - operator: "template"
                  value: "[[[ return variables.ulm_card_motion_blind_my_blockentity != '' && 
                                      states[variables.ulm_card_motion_blind_my_blockentity].state == 'on' ]]]"
                  styles:
                    icon:
                      - opacity: "0.4"
              tap_action:
                action: "call-service"
                service: "cover.close_cover"
                service_data:
                  entity_id: "[[[ return variables.ulm_card_motion_blind_my_entity ]]]"
              icon: "mdi:arrow-down"
blue_slider:
  state:
    - styles:
        icon:
          - color: "rgba(var(--color-blue),1)"
        label:
          - color: "rgba(var(--color-blue-text),1)"
        name:
          - color: "rgba(var(--color-blue-text),1)"
        img_cell:
          - background-color: "rgba(var(--color-blue), 0.2)"
        card:
          - background-color: "rgba(0,0,0,0)"
      value: "on"
motion_cover:
  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: >-
    [[[
        if (typeof states[entity.entity_id].attributes.current_position === "undefined"){
          if (states[entity.entity_id].state == "closed"){
            return variables.ulm_closed;
          } else
            return variables.ulm_open;
        } else {
          if (states[entity.entity_id].attributes.current_position == 0){
            return variables.ulm_closed;
          } else {
            return variables.ulm_open + " • " + Math.round((states[entity.entity_id].attributes.current_position)) + "%" ;
          }
        }
        return "?";
    ]]]
  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)"
2 Likes

I’ve installed the Minimalist UI twice (first time via HACS, second manually), but I’m unable to get the templates working correctly. Anyone know what’s up?

I’ve verified that the integrations were all added, and it looks like templates are appearing in the correct directory.

Change your theme under profile settings to one of the minimalist themes.

If you don’t see minimalist themes add those lines in the configuration file and restart HA.

frontend:
  themes: !include_dir_merge_named themes

very nicely done how did you get it right from tado if i may ask & the part of the recalculations to 0-100 do you have an example of how this is done & how did you get the ‘sensor.air_pollen_value_grass_d_a_tomorrow’ this wall i only have 1 in tomorrow living in belgium? thanks in advance for the share

thank you for sharing the cover card I will definitely take a look do you happen to have a photo of this? thank you in advance!

Thank you so much for this. The wiki docs should be updated to mention this step – I didn’t see it anywhere after going through them for several hours!

The wiki does mention it :wink:


On this page Installation - UI Lovelace Minimalist


On this page FAQ - UI Lovelace Minimalist

Any suggestion to make it more clear is always welcome :smiley:

I put it in the post with the code.

Sheesh, yep, you’re right. Totally missed it.

I would recommend updating the installation instructions to more of a Step 1, Step 2, Step 3 format. As written currently, with that information in an info block, its easy to miss.

Thanks again for the help!

1 Like

I put the link to where I got the tado pollen data from in the post with the card as well. That holds the instructions how to set it up. I adapted the code a bit to suit my needs a bit more:

- platform: rest
  name: TadoAir
  verify_ssl: true
  scan_interval: 3600
  resource: !secret tado_air_url
  headers:
    User-Agent: Home Assistant
    Content-Type: application/json
  method: GET
  json_attributes:
    - roomMessages
    - outdoorQuality
  value_template: "Tado airComfort"
- platform: template
  sensors:
    air_quality:
      value_template: '{{ states.sensor.tadoair.attributes["outdoorQuality"]["aqi"]["level"] | capitalize }}'
      friendly_name: "Luchtkwaliteit"
      icon_template: mdi:air-filter
    air_pollen_level:
      value_template: '{{ states.sensor.tadoair.attributes["outdoorQuality"]["pollens"]["dominant"]["level"] | replace("HIGH","Hoog") | replace("MEDIUM","Matig") | replace("LOW","Laag") | replace("NONE","Geen") }}'
      friendly_name: "Pollen niveau"
      icon_template: mdi:flower-pollen
    air_pollen_value:
      value_template: '{{ (states.sensor.tadoair.attributes["outdoorQuality"]["pollens"]["dominant"]["level"] | replace("HIGH","100") | replace("MEDIUM","60") | replace("LOW","20") | replace("NONE","10")) | int(0) }}'
      friendly_name: "Pollen waarde"
      icon_template: mdi:flower-pollen
    air_pollen_level_grass:
      value_template: '{{ states.sensor.tadoair.attributes["outdoorQuality"]["pollens"]["types"][0]["forecast"][0]["level"] | replace("HIGH","Hoog") | replace("MEDIUM","Matig") | replace("LOW","Laag") | replace("NONE","Geen") }}'
      friendly_name: "Graspollen"
      icon_template: mdi:grass
    air_pollen_value_grass:
      value_template: '{{ (states.sensor.tadoair.attributes["outdoorQuality"]["pollens"]["types"][0]["forecast"][0]["level"] | replace("HIGH","100") | replace("MEDIUM","60") | replace("LOW","20") | replace("NONE","10")) | int(0) }}'
      friendly_name: "Graspollen"
      icon_template: mdi:grass
      unit_of_measurement: "%"
    air_pollen_level_grass_tomorrow:
      value_template: '{{ states.sensor.tadoair.attributes["outdoorQuality"]["pollens"]["types"][0]["forecast"][1]["level"] | replace("HIGH","Hoog") | replace("MEDIUM","Matig") | replace("LOW","Laag") | replace("NONE","Geen")  }}'
      friendly_name: "Graspollen morgen"
      icon_template: mdi:grass
    air_pollen_value_grass_tomorrow:
      value_template: '{{ (states.sensor.tadoair.attributes["outdoorQuality"]["pollens"]["types"][0]["forecast"][1]["level"] | replace("HIGH","100") | replace("MEDIUM","60") | replace("LOW","20") | replace("NONE","10")) | int(0) }}'
      friendly_name: "Graspollen morgen"
      icon_template: mdi:grass
      unit_of_measurement: "%"
    air_pollen_level_grass_d_a_tomorrow:
      value_template: '{{ states.sensor.tadoair.attributes["outdoorQuality"]["pollens"]["types"][0]["forecast"][2]["level"] | replace("HIGH","Hoog") | replace("MEDIUM","Matig") | replace("LOW","Laag") | replace("NONE","Geen")  }}'
      friendly_name: "Graspollen overmorgen"
      icon_template: mdi:grass
    air_pollen_value_grass_d_a_tomorrow:
      value_template: '{{ (states.sensor.tadoair.attributes["outdoorQuality"]["pollens"]["types"][0]["forecast"][2]["level"] | replace("HIGH","100") | replace("MEDIUM","60") | replace("LOW","20") | replace("NONE","10")) | int(0) }}'
      friendly_name: "Graspollen overmorgen"
      icon_template: mdi:grass
      unit_of_measurement: "%"
    air_pollen_level_weed:
      value_template: '{{ states.sensor.tadoair.attributes["outdoorQuality"]["pollens"]["types"][1]["forecast"][0]["level"] | replace("HIGH","Hoog") | replace("MEDIUM","Matig") | replace("LOW","Laag") | replace("NONE","Geen")  }}'
      friendly_name: "Onkruidpollen"
      icon_template: mdi:sprout
    air_pollen_value_weed:
      value_template: '{{ (states.sensor.tadoair.attributes["outdoorQuality"]["pollens"]["types"][1]["forecast"][0]["level"] | replace("HIGH","100") | replace("MEDIUM","60") | replace("LOW","20") | replace("NONE","10")) | int(0) }}'
      friendly_name: "Onkruidpollen"
      icon_template: mdi:sprout
      unit_of_measurement: "%"
    air_pollen_level_weed_tomorrow:
      value_template: '{{ states.sensor.tadoair.attributes["outdoorQuality"]["pollens"]["types"][1]["forecast"][1]["level"] | replace("HIGH","Hoog") | replace("MEDIUM","Matig") | replace("LOW","Laag") | replace("NONE","Geen")  }}'
      friendly_name: "Onkruidpollen morgen"
      icon_template: mdi:sprout
    air_pollen_value_weed_tomorrow:
      value_template: '{{ (states.sensor.tadoair.attributes["outdoorQuality"]["pollens"]["types"][1]["forecast"][1]["level"] | replace("HIGH","100") | replace("MEDIUM","60") | replace("LOW","20") | replace("NONE","10")) | int(0) }}'
      friendly_name: "Onkruidpollen morgen"
      icon_template: mdi:sprout
      unit_of_measurement: "%"
    air_pollen_level_weed_d_a_tomorrow:
      value_template: '{{ states.sensor.tadoair.attributes["outdoorQuality"]["pollens"]["types"][1]["forecast"][2]["level"] | replace("HIGH","Hoog") | replace("MEDIUM","Matig") | replace("LOW","Laag") | replace("NONE","Geen")  }}'
      friendly_name: "Onkruidpollen overmorgen"
      icon_template: mdi:sprout
    air_pollen_value_weed_d_a_tomorrow:
      value_template: '{{ (states.sensor.tadoair.attributes["outdoorQuality"]["pollens"]["types"][1]["forecast"][2]["level"] | replace("HIGH","100") | replace("MEDIUM","60") | replace("LOW","20") | replace("NONE","10")) | int(0) }}'
      friendly_name: "Onkruidpollen overmorgen"
      icon_template: mdi:sprout
      unit_of_measurement: "%"
    air_pollen_level_tree:
      value_template: '{{ states.sensor.tadoair.attributes["outdoorQuality"]["pollens"]["types"][2]["forecast"][0]["level"] | replace("HIGH","Hoog") | replace("MEDIUM","Matig") | replace("LOW","Laag") | replace("NONE","Geen")  }}'
      friendly_name: "Boompollen"
      icon_template: mdi:tree
    air_pollen_value_tree:
      value_template: '{{ (states.sensor.tadoair.attributes["outdoorQuality"]["pollens"]["types"][2]["forecast"][0]["level"] | replace("HIGH","100") | replace("MEDIUM","60") | replace("LOW","20") | replace("NONE","10")) | int(0) }}'
      friendly_name: "Boompollen"
      icon_template: mdi:tree
      unit_of_measurement: "%"
    air_pollen_level_tree_tomorrow:
      value_template: '{{ states.sensor.tadoair.attributes["outdoorQuality"]["pollens"]["types"][2]["forecast"][1]["level"] | replace("HIGH","Hoog") | replace("MEDIUM","Matig") | replace("LOW","Laag") | replace("NONE","Geen")  }}'
      friendly_name: "Boompollen morgen"
      icon_template: mdi:tree
    air_pollen_value_tree_tomorrow:
      value_template: '{{ (states.sensor.tadoair.attributes["outdoorQuality"]["pollens"]["types"][2]["forecast"][1]["level"] | replace("HIGH","100") | replace("MEDIUM","60") | replace("LOW","20") | replace("NONE","10")) | int(0) }}'
      friendly_name: "Boompollen morgen"
      icon_template: mdi:tree
      unit_of_measurement: "%"
    air_pollen_level_tree_d_a_tomorrow:
      value_template: '{{ states.sensor.tadoair.attributes["outdoorQuality"]["pollens"]["types"][2]["forecast"][2]["level"] | replace("HIGH","Hoog") | replace("MEDIUM","Matig") | replace("LOW","Laag") | replace("NONE","Geen")  }}'
      friendly_name: "Boompollen overmorgen"
      icon_template: mdi:tree
    air_pollen_value_tree_d_a_tomorrow:
      value_template: '{{ (states.sensor.tadoair.attributes["outdoorQuality"]["pollens"]["types"][2]["forecast"][2]["level"] | replace("HIGH","100") | replace("MEDIUM","60") | replace("LOW","20") | replace("NONE","10")) | int(0) }}'
      friendly_name: "Boompollen overmorgen"
      icon_template: mdi:tree
      unit_of_measurement: "%"
1 Like

Thanks man for this info

Before going down the rabbit hole thought I would ask first. Does anyone know if its possible to change the popup cards to a tap action instead of using a hold action?

@Edwin_D

I’m having the exact same issues. Did you fix this?

For me it boiled down to browser_mod. Despite working as it should, it produced errors in the log, tons of entities and slowdown of the UI, so I had removed it. Older versions are OK with that, the last two versions require it or loading the page resources crashes. I now have the browser_mod addon installed in HACS, but without the integration. That for now helped me, But I’d rather do without entirely.

hello I have a question I’m working on making the pollen sensor from tado but it doesn’t want to get anything I think I have entered everything correctly but don’t know how is your resource link? mean ? thank you in advance!

https://acme.tado.com/v2/homes/here your home code ?/airComfort?latitude=here your lantitude of my location ?&longitude=here is the longitude of my location ?&username=here is my username my email address ?&password=here is my tado password ?

I followed the guide in the link above my original post. One difference I see is you use v2 and not v1 like in the original post.

I thought the v2 wanted me to also be the v2 so but it is indeed v1 I’m really up to date with nice pollen sensor wall is very useful for me have a heavy pollen allergy thanks man for helping!

1 Like

This is just a slight modification of the vacuum card to control Mi Smart Air Fryer (3.5L). With the Xiaomi Miot Auto integration it creates 3 buttons to control the device, so not sure if it is usable for other air fryer brands. If anyone feels the strength, could add the time and temperature control. Don’t know if it worth uploading it to the custom card section (never did something similar before). I made it collapse, when it is fully turned off (to protect the OLED screen it has)

image image

template:

---
custom_card_air_fryer:
  show_name: false
  show_icon: false
  show_label: false
  template:
    - "ulm_custom_card_air_fryer_language_variables"
  variables:
    ulm_custom_card_air_fryer_name: "[[[ return entity.attributes.friendly_name ]]]"
    ulm_custom_card_air_fryer_icon: "[[[ return entity.attributes.icon ]]]"
  triggers_update: "all"
  styles:
    grid:
      - grid-template-areas: >
          [[[
            if( entity.state.toLowerCase() === 'unavailable' ){
              return "'item1'";
            } else {
              return "'item1' 'item2'";
            }
          ]]]
      - grid-template-columns: "1fr"
      - grid-template-rows: >
          [[[
            if( entity.state.toLowerCase() === 'unavailable' ){
              return "repeat(1, min-content)";
            } else {
              return "repeat(2, min-content)";
            }
          ]]]
      - row-gap: "12px"
    card:
      - border-radius: "var(--border-radius)"
      - box-shadow: "var(--box-shadow)"
      - padding: "12px"
      - background-color: >
          [[[
            if(hass.themes.darkMode)
              if( entity.state.toLowerCase() === 'cooking' ){
                return 'rgba(var(--color-green),0.1)'
              } else if( entity.state.toLowerCase() === 'pause' ){
                return 'rgba(var(--color-yellow),0.1)'
              } else if( entity.state.toLowerCase() === 'pause2' ){
                return 'rgba(var(--color-red),0.1)'
              } else if( entity.state.toLowerCase() === 'standby' ){
                return 'rgba(var(--color-blue),0.1)'
              }
          ]]]
    custom_fields:
      item2:
        - display: >
            [[[
                if ( entity.state.toLowerCase() === 'unavailable' ) {
                    return "none";
                } else {
                    return "block";
                }
            ]]]

  custom_fields:
    item1:
      card:
        type: "custom:button-card"
        template: "icon_more_info"
        custom_fields:
          item1:
            card:
              type: "custom:button-card"
              entity: "[[[ return entity.entity_id ]]]"
              icon: "[[[ return variables.ulm_custom_card_air_fryer_icon ]]]"
              styles:
                icon:
                  - color: >
                      [[[
                        if( entity.state.toLowerCase() === 'cooking' ){
                          return 'rgba(var(--color-green),1)'
                        } else if( entity.state.toLowerCase() === 'pause' ){
                          return 'rgba(var(--color-yellow),1)'
                        } else if( entity.state.toLowerCase() === 'pause2' ){
                          return 'rgba(var(--color-red),1)'
                        } else if( entity.state.toLowerCase() === 'standby' ){
                          return 'rgba(var(--color-blue),1)'
                        } else {
                        return 'rgba(var(--color-theme),0.2)'
                        }
                      ]]]
                img_cell:
                  - background-color: >
                      [[[
                        if( entity.state.toLowerCase() === 'cooking' ){
                          return 'rgba(var(--color-green),0.2)'
                        } else if( entity.state.toLowerCase() === 'pause' ){
                          return 'rgba(var(--color-yellow),0.2)'
                        } else if( entity.state.toLowerCase() === 'pause2' ){
                          return 'rgba(var(--color-red),0.2)'
                        } else if( entity.state.toLowerCase() === 'standby' ){
                          return 'rgba(var(--color-blue),0.2)'
                        } else {
                        return 'rgba(var(--color-theme),0.05)'
                        }
                      ]]]
          item2:
            card:
              type: "custom:button-card"
              templates:
                - "ulm_custom_card_air_fryer_language_variables"
              entity: "[[[ return entity.entity_id ]]]"
              name: "[[[ return variables.ulm_custom_card_air_fryer_name ]]]"
              label: >
                [[[
                  let label = entity.attributes.friendly_name
                  if(variables.ulm_custom_card_air_fryer_label){
                    label = variables.ulm_custom_card_air_fryer_label;
                  } else if(entity.state.toLowerCase() === 'cooking'){
                    label = variables.ulm_custom_card_air_fryer_cooking;
                  } else if(entity.state.toLowerCase() === 'pause'){
                    label = variables.ulm_custom_card_air_fryer_paused;
                  } else if(entity.state.toLowerCase() === 'pause2'){
                    label = variables.ulm_custom_card_air_fryer_paused2;
                  } else if(entity.state.toLowerCase() === 'standby'){
                    label = variables.ulm_custom_card_air_fryer_standby;
                  } else {
                    label = entity.state;
                  }
                  return label
                ]]]
    item2:
      card:
        type: "custom:button-card"
        template: "list_3_items"
        styles:
          card:
            - padding: "0px"
            - background: "none"
            - border-radius: "0"
            - box-shadow: "none"
          grid:
            - grid-template-areas: "'item1 item2 item3'"
            - grid-template-columns: "1fr 1fr 1fr"
        custom_fields:
          item1:
            card:
              type: "custom:button-card"
              template: "widget_icon"
              icon: "mdi:stop"
              tap_action:
                action: "call-service"
                service: "button.press"
                service_data:
                  entity_id: "[[[ return variables.ulm_custom_card_air_fryer_cancel_button_entity ]]]"
          item2:
            card:
              type: "custom:button-card"
              template: "widget_icon"
              icon: "mdi:play"
              tap_action:
                action: "call-service"
                service: "button.press"
                service_data:
                  entity_id: "[[[ return variables.ulm_custom_card_air_fryer_start_button_entity ]]]"
          item3:
            card:
              type: "custom:button-card"
              template: "widget_icon"
              icon: "mdi:pause"
              tap_action:
                action: "call-service"
                service: "button.press"
                service_data:
                  entity_id: "[[[ return variables.ulm_custom_card_air_fryer_pause_button_entity ]]]"

language file:

---
ulm_custom_card_air_fryer_language_variables:
  variables:
    ulm_custom_card_air_fryer_cooking: "Cooking"
    ulm_custom_card_air_fryer_paused: "Paused"
    ulm_custom_card_air_fryer_paused2: "Not ready"
    ulm_custom_card_air_fryer_standby: "Stopped"

card:

- type: "custom:button-card"
  template: "custom_card_air_fryer"
  entity: sensor.air_fryer
  variables:
    ulm_custom_card_air_fryer_name: "Air fryer"
    ulm_custom_card_air_fryer_icon: "mdi:grill-outline"
    ulm_custom_card_air_fryer_cancel_button_entity: button.cancel_cooking
    ulm_custom_card_air_fryer_start_button_entity: button.start_cook
    ulm_custom_card_air_fryer_pause_button_entity: button.pause
4 Likes