Not supposed to be used as a footer or header.
Only stock graph may be used for header & footer with ONE sensor defined by the “entity:” option.
There is no "entity"
option for "mini-graph-card"
, so there is an error:
I hear what you’re saying, and I see the docs. Just wanted to mention that this works for me on 2021.5.5. I suppose it will break now when I upgrade my HA instance.
- type: entities
title: Electricity Consumption
show_header_toggle: false
entities:
- entity: sensor.daily_power_consumption
name: Today
icon: mdi:power-plug
- entity: sensor.monthly_power_consumption
name: This Month
icon: mdi:power-plug
- entity: sensor.monthly_power_consumption_forecast
name: This Month's Forecast
icon: mdi:trending-up
footer:
type: custom:mini-graph-card
entities:
- entity: sensor.current_power
hours_to_show: 24
hour24: true
smoothing: true
points_per_hour: 12
line_width: 2
line_color: var(--custom-graph-color-red)
show:
extrema: true
name: false
icon: false
average: true
state: true
(See the above config, @typxxi.)
almost ashamed to ask, for this must be way too simple, but it honestly is my first graph with a secondary y-axis…
could somebody please throw me a quick pointer where I can find the options to set the secondary y-axis?
my solar would go from 0- 6000 watt, and the cloud coverage from 0- 100% …
- type: custom:mini-graph-card
name: Zon & Wolk
entities:
- entity: sensor.zp_actuele_opbrengst
name: Opbrengst
- entity: sensor.weatherbit_cloud_coverage
name: Bewolking
show_line: true
show_points: true
show_legend: true
y_axis: secondary
show:
labels: true
labels_secondary: true
upper_bound_secondary: 100
is incorrect obviously:
thanks…
Marius, hi.
Check this.
type: custom:mini-graph-card
name: Zon & Wolk
entities:
- entity: sensor.cleargrass_1_co2
name: CO2
color: green
- entity: sensor.battery_life360_ildar
name: Charge
color: red
show_points: true
show_legend: true
y_axis: secondary
show:
labels: true
legend: true
name: true
icon: false
labels_secondary: true
hours_to_show: 24
points_per_hour: 60
line_width: 2
height: 200
lower_bound: 0
lower_bound_secondary: 0
upper_bound_secondary: 100
The lower_bound_secondary: 0
could be your point.
a yes, I took those for default… adding them makes this:
- type: custom:mini-graph-card
name: Zon & Wolk
entities:
- entity: sensor.zp_actuele_opbrengst
name: Opbrengst
color: gold
- entity: sensor.weatherbit_cloud_coverage
name: Bewolking
color: grey
show_line: true
show_points: true
show_legend: true
y_axis: secondary
show:
labels: true
labels_secondary: true
lower_bound: 0
lower_bound_secondary: 0
upper_bound_secondary: 100
and
only started recording the cloud coverage sensors since this afternoon, so not sure yet if this is the right one to use, but the graph is better now.,
thanks!
Hi gents
Any idea why this is not working
type: custom:mini-graph-card
name: Watering Last 7 Days
icon: mdi:sprinkler-variant
entities:
- entity: binary_sensor.irrigation_unlimited_c1_z1
attribute: today_total
- entity: binary_sensor.irrigation_unlimited_c1_z2
attribute: today_total
show:
graph: bar
labels: true
unit: min
aggregate_func: max
hours_to_show: 168
group_by: date
lower_bound: 0
I think that you messed up the things - binary sensor have just 2 states - true / false and doesn’t have attributes (attributes are feature of devices).
Be inclusive.
Attributes aren’t supported — it’s not a documented feature. You need to create a template sensor to extract the attributes into its own sensor (it’s been asked several times on this thread).
According to Github, attributes are added to dev version; we are waiting for release version; and probably anyway I gonna stay with template sensors & availability checks…
No, you can create a template binary sensor with attributes.
Is there any way to have a graph from a sensor, but also draw in the same graph a horizintal line with a value. The scope is clearly see if we are below or above a certain treshold (horizintal line). THX!
You can add the 2nd graph for a template sensor which is = threshold value.
Kind of this (here the red line is for zero):
any way to change this icon according to the status?
For example, off icon A, on icon B
- to replace the icon - use config-template-card
- to change the icon’s size or color - use card-mod
any doc about this? How use, example, variables?
config-template-card - read community forum (use search) as well as official docs on GitHub (there is a link to the docs on the 1st post in the corresponding forum’s thread
card-mod - search for my post in this thread with examples
Nice, i’ll search, tks bro.
Hello guys, is there a way to set the animation speed of the graph?
Thanks!