Hi everyone,
I’m trying to do something like this with apex-charts :
Where “VMC” is my air ventilation based on a template who does this :
etat_vmc_etage:
friendly_name: "Etat VMC Etage 60-100"
unique_id: 'etat_vmc_etage_60_100'
value_template: >-
{% if is_state('switch.mod_vmc_l1', 'on') %}
100
{% else %}
60
{% endif %}
And my apex-charts configuration who is :
type: custom:apexcharts-card
graph_span: 12h
header:
show: false
title: Humidité
show_states: true
colorize_states: true
apex_config:
yaxis:
- id: first
min: 60
max: 100
labels:
formatter: |
EVAL:function(value) {
return value.toFixed(0) + '%';
}
- id: last
opposite: true
min: 10
max: 35
labels:
formatter: |
EVAL:function(value) {
return value.toFixed(0) + '°C';
}
series:
- entity: sensor.ct_xiao_ble_horloge_1_humidity
name: Humidité
color: "#3366FF"
yaxis_id: first
stroke_width: 3
fill_raw: last
group_by:
func: avg
duration: 1h
show:
legend_value: false
extremas: true
in_header: false
- entity: sensor.ct_virtuel_petite_sdb
name: Température
color: "#FF6633"
yaxis_id: last
stroke_width: 3
fill_raw: last
group_by:
func: avg
duration: 1h
show:
legend_value: false
extremas: true
in_header: false
- entity: sensor.etat_vmc_etage
name: VMC
yaxis_id: first
stroke_width: 0
type: area
color: "#339933"
group_by:
func: avg
duration: 1m
show:
legend_value: false
card_mod:
style: |
ha-card {
border-width: 0px;
}
But I don’t know why my green area “VMC” is buggy… It doesn’t show the small times (10 minutes) when it’s on :
And it doesn’t stop when it’s off :
I’m planning to have lots of those kind of charts