Gauge Widget

Can someone please help me to get the gauge widget working for one of my sensors? I have a sensor with the entity ID: sensor.owl_meter_power

It tells me there’s an issue with the widget_type: gauge line, I then refresh and I just get a black screen on my dashboard until I delete the references to the gauge and refresh, I tried to follow the documentation and search for gauge in the forums but couldn’t find anything to help, probably something really simple I’m doing wrong.

owl_meter_power
    widget_type: gauge
    title: Energy
    units: "W"
    min: 0
    max: 5000
    entity: sensor.owl_meter_power

layout:
    - owl_meter_power

missing a colon after owl_meter_power

owl_meter_power:
    widget_type: gauge
    title: Energy
    units: "W"
    min: 0
    max: 5000
    entity: sensor.owl_meter_power

layout:
    - owl_meter_power
1 Like

I thought no way, I copied and pasted it wrong in to this post but you are right I was missing the colon, how embarrassing. It threw me off because it was coming up with an error on the widget type line, thanks a lot for your help!

I have an issue with the precision of this widget.

When I use it for “Humidity” the gauge goes in steps of 5%. (0, 5, 10, 15, 20, and so on…) Although the sensor provides the value in steps of 1.

When I use it for “Memory Usage” in a NAS with 2 GB RAM, it goes in steps of 1 GB. So even when the system is using only 0.65 GB it will show it as 1 GB of 2 GB.

How can I change the precision?

you can set precision from the whole dashboard as default to 2
the widget takes what it gets from homeassistant as value. so if the gauge goes in steps from 5% i cant imagine that the sensor provides 1%. there is nothing in the code that translates 3% to 5%

so you need to provide more info to see where it goes wrong in your case.

I already had the precision for the dashboard set but that does absolutely nothing for the gauge.

global_parameters:
    use_comma: 0
    precision: 2

and the widget:

 nas2_mem:
    widget_type: gauge
    entity: sensor.qnap2_memory_available
    title: "Memory"
    title2: "GB"
    max: 2
    min: 0
    units: " "
    low_color: 4CFF00
    med_color: FFD800
    high_color: FF0000
    title2_style: "color: white; font-size: 9pt;"
    bgcolor: gray
    color: white
    widget_style: "background: rgba(44,62,80, 0.85);"

On the dev-state panel the sensor reads 0.84 GB
On the gauge it says 1 GB.

its possible that gauge always has precision 0 (cant remember, i havent worked with it for a while)
in that case, change the precision from the sensor in HA, or create a template sensor for it.

Because I could not work out how to show the decimals in the gauge, I created a template sensor that multiplies the value by 1024 and changed the unit to MB. That works for me.

Thanks again.

1 Like