Lovelace: Gauge card


Gauge card

Due to popular request, I’ve created a sample card to better display sensor information visually on an interface. This is not the first of it’s kind as I’ve seen after that other people already done similar things in the past: Gauge Chart

Most important thing of this card is that this it’s standalone using mostly CSS without extra javascript libraries. One other important thing is that it allows custom scaling with parameters to allow using it together with stack cards.

It’s based on code from

@cogneato showed me a very cool Resource Monitor (similar to my Systems Tab) using this and I was impressed, so I decided I’d share here as well.


You can find the code here


The instructions are also found on the above repo.

  1. Download gauge-card.js
  2. Place the file in your config/www folder
  3. Include the card code in your ui-lovelace.yaml
  - url: /local/gauge-card.js?v=1
    type: js

Note: You can change v=1 to a higher number whenever updating code to avoid having to clear cache in all browsers

  1. Write configuration for the card in your ui-lovelace.yaml
- type: horizontal-stack
    - type: custom:gauge-card
      title: Temperature
      entity: sensor.random_temperature
      min: -20
      max: 35
    - type: custom:gauge-card
      title: Oil
      entity: sensor.my_oil_sensor
        red: 50
        green: 0
        amber: 40
  1. Reload your Lovelace tab (no need to restart Home Assistant or other things) and you should see the card.


Buy Me A Coffee if you like the cards so much that wish to express your gratitude.

Gauge Chart
Lovelace: dual gauge card

I had simply used @ciotlosm’s gauge card with the sensors provided by the system monitor component. Super easy.



thanks for sharing this


Great share!

Do you get a history trend over time if you click on the gauge image (like if you click on the value in the old frontend)?


Just implemented this for my HP Ink Levels and looks really awesome. Also tried to click the card but nothing happens, so looks like there is no history.


Not configured to work like that, but could be added. You can raise a feature request here:

@Bramus ^^


thank you for sharing this card. it’s very nice.
Is there a way to prevent it from “propagating” outside it’s box?
I checked in both Chrome and Safari and the arch sometimes expands outside its box


Just use “scale:” parameter to scale it


first apologies. should have read the docs.
thank you for the help.


@Bramus @phileep You can update your Gauge card to see if now it shows what you expected on click.


Great addon thanks!

Possible to make it show details like history or attributes when clicked?


@g0g0 update it and try again


Not sure if it is in the card / js file but found this:
Running Home Assistant behind NGINX proxy. Now remote from other location as home i’m getting the following error on the card: Uncaught SyntaxError: Unexpected token <

The card is showing that it can not find the Custom Element gauge-card. It is working from internally but when i’m outside my home network I get the error about the token.

In my configuration.yaml i have setup the base_url as


Make sure you clear cache, and maybe update in resources the URL to have v=2 at the end


Also make sure you used “raw” version for download:


?v=2 did the trick :slight_smile:

On my iPhone i do see another error: TypeError: Cannot call a class constructor without |new|


Make sure you have javascript_version: latest in your frontend: block inside configuration.yaml

Added more info in the new FAQ section:


I liked these cards already, but… wow… I love them now. Nice work!


getting “Custom element doesn’t exist: gauge-card.” error. I made sure I used the raw format and also have javascript_version: latest in my configuration.yaml. I also appended v=2. Here is my config.

  • type: horizontal-stack
    • type: custom:gauge-card
      title: office temp
      entity: sensor.office_multisensor_temperature


Do you have any JS errors in your console? What browser are you using?


I have tried both firefox and chrome.