Card for showing Liquids (fluid-level-background-card)

I have saw your post on the Github as well. I have been using it for a few months, but now that I’m getting everything working, I’m trying to polish and tweak for greater functionality and eye candy. I know when I first found the card, there was not a lot of info on it here in the forums and it didn’t have it’s own discussion post like most cards do. So I wanted to highlight it and show off it’s capabilities from someone who struggles outside of YAML :rofl: The developer has definitely worked hard on it and is great about supporting it and it’s users.

Hoping this will help shine a line on it and more people start using it and people way smarter than me can really make it shine.

1 Like

I would be happy if you create a new thread in “Share your projects” dedicated to this card. And you may post your nice example card there. Shame that this great card does not have it’s dedicated thread yet.
If you create this thread - please post a link to it here.
Btw, developer lives in Odessa - and I can imagine how it is there now during the war.

Thanks, @Ftown1404, for using and sharing my card. I am amazed at what you did with it.

3 Likes

You made it all possible, so thank you! Would love for an official post from you showcasing your card. That way everyone can show off, ask for help, etc. like most other cards. This card definetly deserves for you to show off.

Oh I like this for my sump pump well.

As I said - YOU may create this thread, call it “xxxxx card”, add a link to GitHub to the 1st post, then your example as the 2nd post.

No, I got what you said. My reply was to swingerman, the creator.

hi,
can you somebody help to change percentage location higher.

lpg pro

my code

type: custom:fluid-level-background-card
card:
  show_state: true
  show_name: false
  camera_view: auto
  type: picture-entity
  image: /api/image/serve/403d557dbc269e3587efba40051fcc21/512x512
  entity: sensor.mi_10_battery_level
entity: sensor.mi_10_battery_level
fill_entity: sensor.mi_10_battery_level
background_color:
  - 0
  - 143
  - 81
severity:
  - value: 42
    color:
      - 255
      - 0
      - 0
full_value: "100"

I found gas tank on internet. with Gimp erased tank middle or change color to alpha. save as png
but can not figure out how to move percentage higher

and entity: sensor.mi_10_battery_level is just testing for card. before I get up scale installation

there is absolutely no need to add media queries as you can do it more dynamic, I loved your creativity btw,…

type: picture-elements
elements:
  - type: custom:fluid-level-background-card
    entity: sensor.water_tank_pico_w_jsn_sr04t
    style:
      z-index: 1
      top: 50%
      left: 50%
      transform: translate(-50%, -50%)
      width: 100%
      height: 100%
    card_mod:
      style: |
        ha-card {
          text-align: center;
          --ha-card-border-color: transparent !important;
          box-shadow: none !important;
          background: none !important;
          border-radius: 50px;
          overflow: hidden;
        }  
        #container, .container {
          width: 23.3% !important;
          height: 70% !important;
          position: relative !important;
          border-radius: 14px !important;
          margin-left: 38.2%;
          margin-top: 8%;
          # transform: translate(150%, -50%);
          opacity: 0.9;
          overflow: hidden;
        }
    level_color:
      - 82
      - 171
      - 255
    severity:
      - color:
          - 255
          - 71
          - 71
        value: 0
      - color:
          - 112
          - 200
          - 255
        value: 20
      - color:
          - 56
          - 179
          - 255
        value: 50
      - color:
          - 0
          - 145
          - 255
        value: 80
    fill_entity: input_boolean.water_tank_filling
    full_value: "110"
    card:
      type: custom:card-templater
      card:
        type: entity
        entity: sensor.water_tank_pico_w_jsn_sr04t
        title_template: "{{states(''sensor.water_tank_pico_w_jsn_sr04t'')|round(0)}}% "
        show_header_toggle: false
        show_name: false
        name: Water
        icon: mdi:water
        position:
          value: "off"
        card_mod:
          style: |
            ha-card {
             --ha-card-header-font-size: 14px;
               height: 225px !important;

            }
            .card-header {
             justify-content: center !important;
            }
            .name {
             overflow: unset !important;
            }
title: Water Tank Level
image: /api/image/serve/28c8b426342f41911f00efe171696668/512x512
card_mod:
  style:
    hui-image $: |
      img {
        z-index: 1 !important;
        position: relative !important;
        right: 0px;
        top: 0px;
        width: 100% !important;
        opacity: 1
      }

use card mod, GitHub - thomasloven/lovelace-card-mod: 🔹 Add CSS styles to (almost) any lovelace card

here’s another, with different image :smiley:
water-tank-gif-ezgif.com-optimize
water-tank-2-gif
below one is more realistic… :wink:
water-tank-on-roof-transparent

1 Like

The card’s author created this thread, can be used for discussing the card:

1 Like

Hi! I’m a bit stuck… I’m not able to change the font size of the value.
I want to show “-4890” but it’s only showing a few caracters.
2024-11-29 22_16_15-Overzicht – Home Assistant
I allready modified the font size but it’s not changing anything.

card_mod:
          style: |
            ha-card {
              --ha-card-header-font-size: 13px;
              height: 225px !important;
            }
            .card-header {
             justify-content: center !important;
            }
            .name {
             overflow: unset !important;
            }

Thanks

value is negative. -4.89
and also paste complete template code. and if you just want to change the font-size kindly read card-mod docs

Resolved!
I had to enter “important!” when changing font size…

1 Like

Thanks alot for share , would you upload the png file for the tank .thanks

Sure, but I also got this here :
https://community.home-assistant.io/t/card-for-showing-liquids-fluid-level-background-card/758558/6?u=donder24

can you share cylinder3.png pls

can share the tank image.png
pls