Open szymucha94 opened 1 year ago
main entity value that is shown on the card and additional entities that are shown only as graphs.
Not clear what you mean by "main value shown on the card" & "additional entities shown only as graphs". Every entity may be shown as a graph and/or as a state. Do you mean that your card (which you decided not to explain by a code) contains 2 entities - with a state, w/o a graph + w/o a state, with a graph ?
This is my card:
type: custom:mini-graph-card
view_layout:
column: 2
entities:
- entity: sensor.mainenergymetercurrent_power
show_graph: false
show_state: true
- entity: sensor.mainenergymetertotal_energy
show_graph: true
show_state: false
name: Energy consumption
name: Current Power Consumption
hour24: true
aggregate_func: delta
hours_to_show: 18
height: 88
decimals: 2
points_per_hour: 1
update_interval: 600
labels_secondary: false
group_by: hour
show:
graph: bar
labels: false
fill: true
What I need is to represent sensor.mainenergymetercurrent_power as integer and sensor.mainenergymetertotal_energy as float. Currently if I set "decimals: 0" sensor.mainenergymetercurrent_power is represented as expected, but sensor.mainenergymetertotal_energy (per hour) is shown as zero. So I've set "decimals: 2" which makes sensor.mainenergymetertotal_energy (per hour) readable, but on the other hand sensor.mainenergymetercurrent_power now has useless zeros after dot.
Next time use TRIPLE "`" for code. Formatted the code by myself.
labels_secondary: false
- must be used inside the show
section.
Here this option is meaningless - you have no entities assigned for the secondary axis.
So, your proposal is to support separate decimals
options for each entity?
Yes, precisely.
This will be fixed as part of the configuration update, allowing you to set most options on entity-level with global defaults/overrides!
Hey was this ever added? I'm trying to show two entities, one without decimals and the other has 1 decimal. I can't set this to show correctly without per-entity decimal settings. Is this still planned or does someone know of a workaround?
Please separate "decimals" parameter for main entity value that is shown on the card and additional entities that are shown only as graphs. Currently I'm forced to use "decimals: 2" for both graph and main entity which results in unnecessary zeros after decimal point for power usage while two decimal points are necessary for energy consumption readings:
Please, pretty please :) Cheers