Voila le code de mes cartes Apex :
Consommation/Coûts Energie Globale :
type: custom:apexcharts-card
cache: false
update_interval: 1h
header:
standard_format: true
show: false
title: Consommation HP/HC 7j
show_states: true
span:
end: day
graph_span: 7d
stacked: true
apex_config:
fill:
opacity: 1
type: gradient
gradient:
shade: light
type: horizontal
grid:
show: true
xaxis:
axisBorder:
show: false
axisTicks:
show: false
yaxis:
show: true
series:
- entity: sensor.daily_energy_offpeak
type: column
name: HC
color: 5A6FE7
opacity: 1
group_by:
duration: 1d
func: diff
show:
datalabels: true
- entity: sensor.daily_energy_peak
type: column
name: HP
color: EA4234
opacity: 1
group_by:
duration: 1d
func: diff
show:
datalabels: true
card_mod:
style: |
ha-card {
--ha-card-background: #131313BF;
--ha-card-border-radius: 10px;
--paper-item-icon-color: #6E6E6E;
--paper-item-icon-active-color: #44739e;
}
ha-card > h1 {
text-align: center;
}
type: custom:apexcharts-card
cache: true
update_interval: 30min
header:
show: false
standard_format: true
title: Consommation Jour/7j
show_states: true
span:
end: day
graph_span: 7d
stacked: false
apex_config:
grid:
show: true
xaxis:
axisBorder:
show: false
axisTicks:
show: false
yaxis:
axisBorder:
show: false
axisTicks:
show: false
fill:
opacity: 1
type: gradient
gradient:
shade: light
type: horizontal
series:
- entity: sensor.smart_meter_electric_consumed_kwh
type: column
name: Globale
color: EA4234
opacity: 1
group_by:
duration: 1d
func: diff
show:
datalabels: true
- entity: sensor.cumul_chauffage_new
type: column
name: Chauffages
color: 5A6FE7
unit: kWh
opacity: 1
group_by:
duration: 1d
func: diff
show:
datalabels: true
card_mod:
style: |
ha-card {
--ha-card-background: #131313BF;
--ha-card-border-radius: 10px;
--paper-item-icon-color: #6E6E6E;
--paper-item-icon-active-color: #44739e;
}
ha-card > h1 {
text-align: center;
}
type: custom:apexcharts-card
cache: false
update_interval: 1h
header:
standard_format: true
show: false
title: Coût HP/HC 7J
show_states: true
span:
end: day
graph_span: 7d
stacked: true
apex_config:
fill:
opacity: 1
type: gradient
gradient:
shade: light
type: horizontal
grid:
show: true
xaxis:
axisBorder:
show: false
axisTicks:
show: false
yaxis:
show: true
series:
- entity: sensor.cout_jour_energie_hc
type: column
name: HC
color: 5A6FE7
opacity: 1
group_by:
duration: 1d
func: diff
show:
datalabels: true
- entity: sensor.cout_jour_energie_hp
type: column
name: HP
color: EA4234
opacity: 1
group_by:
duration: 1d
func: diff
show:
datalabels: true
card_mod:
style: |
ha-card {
--ha-card-background: #131313BF;
--ha-card-border-radius: 10px;
--paper-item-icon-color: #6E6E6E;
--paper-item-icon-active-color: #44739e;
}
ha-card > h1 {
text-align: center;
}
type: custom:apexcharts-card
cache: true
update_interval: 10min
header:
show: false
standard_format: true
title: Consommation Heure/24H
show_states: false
span:
start: day
graph_span: 24h
stacked: false
apex_config:
fill:
opacity: 1
type: gradient
gradient:
shade: light
type: horizontal
grid:
show: true
xaxis:
axisBorder:
show: false
axisTicks:
show: false
yaxis:
axisBorder:
show: false
axisTicks:
show: false
series:
- entity: sensor.smart_meter_electric_consumed_kwh
type: column
name: Global
float_precision: 2
color: EA4234
opacity: 1
group_by:
duration: 1h
func: diff
show:
datalabels: false
- entity: sensor.cumul_chauffage_new
type: column
name: Chauffages
float_precision: 2
color: 5A6FE7
opacity: 1
group_by:
duration: 1h
func: diff
show:
datalabels: false
card_mod:
class: add-header
style: |
ha-card {
--ha-card-background: #131313BF;
--ha-card-border-radius: 10px;
--paper-item-icon-color: #6E6E6E;
--paper-item-icon-active-color: #44739e;
}
ha-card > h1 {
text-align: center;
}
type: custom:apexcharts-card
cache: true
update_interval: 10min
header:
show: false
standard_format: true
title: Consommation 24H/Veille
show_states: false
span:
start: day
graph_span: 24h
stacked: false
apex_config:
fill:
opacity: 1
type: gradient
gradient:
shade: light
type: horizontal
grid:
show: true
xaxis:
axisBorder:
show: false
axisTicks:
show: false
yaxis:
axisBorder:
show: false
axisTicks:
show: false
series:
- entity: sensor.smart_meter_electric_consumed_kwh
type: column
name: Veille
offset: '-1d'
float_precision: 2
color: grey
opacity: 0.3
group_by:
duration: 1h
func: diff
show:
datalabels: false
- entity: sensor.smart_meter_electric_consumed_kwh
type: column
name: Jour
float_precision: 2
color: EA4234
opacity: 1
group_by:
duration: 1h
func: diff
show:
datalabels: false
card_mod:
class: add-header
style: |
ha-card {
--ha-card-background: #131313BF;
--ha-card-border-radius: 10px;
--paper-item-icon-color: #6E6E6E;
--paper-item-icon-active-color: #44739e;
}
ha-card > h1 {
text-align: center;
}
type: custom:apexcharts-card
cache: true
update_interval: 10min
header:
show: false
standard_format: true
title: Coût HP/HC 24H
show_states: false
span:
start: day
graph_span: 24h
stacked: true
apex_config:
fill:
opacity: 1
type: gradient
gradient:
shade: light
type: horizontal
grid:
show: true
xaxis:
axisBorder:
show: false
axisTicks:
show: false
yaxis:
axisBorder:
show: false
axisTicks:
show: false
series:
- entity: sensor.cout_heure_energie_hp
type: column
name: HP
float_precision: 2
color: EA4234
opacity: 1
group_by:
duration: 1h
func: diff
show:
datalabels: false
- entity: sensor.cout_heure_energie_hc
type: column
name: HC
float_precision: 2
color: 5A6FE7
opacity: 1
group_by:
duration: 1h
func: diff
show:
datalabels: false
card_mod:
class: add-header
style: |
ha-card {
--ha-card-background: #131313BF;
--ha-card-border-radius: 10px;
--paper-item-icon-color: #6E6E6E;
--paper-item-icon-active-color: #44739e;
}
ha-card > h1 {
text-align: center;
}
Consommation/Energie Chauffage :
type: custom:apexcharts-card
cache: true
update_interval: 5min
header:
show: false
standard_format: true
title: Chauffages 24H
show_states: false
span:
start: day
graph_span: 24h
stacked: false
apex_config:
grid:
show: false
xaxis:
axisBorder:
show: false
axisTicks:
show: false
yaxis:
axisBorder:
show: false
axisTicks:
show: false
fill:
opacity: 1
type: gradient
gradient:
shade: light
type: horizontal
series:
- entity: sensor.cumul_chauffage_new
type: column
offset: '-1d'
name: Veille
float_precision: 2
color: grey
opacity: 0.2
group_by:
duration: 1h
func: diff
show:
datalabels: false
- entity: sensor.cumul_chauffage_new
type: column
name: Chauffages
float_precision: 2
color: EA4234
opacity: 1
group_by:
duration: 1h
func: diff
show:
datalabels: false
card_mod:
class: add-header
style: |
ha-card {
--ha-card-background: #131313BF;
--ha-card-border-radius: 10px;
# --paper-item-icon-color: #6E6E6E;
# --paper-item-icon-active-color: #44739e;
--mini-media-player-background-opacity:0;
--ha-card-box-shadow: 0px;
}
ha-card > h1 {
text-align: center;
}
type: custom:apexcharts-card
cache: true
update_interval: 10min
header:
standard_format: true
show: false
title: Consommation Jour/7j
show_states: true
span:
end: day
graph_span: 7d
stacked: true
apex_config:
fill:
opacity: 1
type: gradient
gradient:
shade: light
type: horizontal
grid:
show: false
xaxis:
axisBorder:
show: false
axisTicks:
show: false
yaxis:
show: false
series:
- entity: sensor.cumul_chauffage_new
type: column
name: Chauffage
color: EA4234
unit: kWh
opacity: 1
group_by:
duration: 1d
func: diff
show:
datalabels: true
card_mod:
style: |
ha-card {
--ha-card-background: #131313BF;
--ha-card-border-radius: 10px;
--paper-item-icon-color: #6E6E6E;
--paper-item-icon-active-color: #44739e;
}
ha-card > h1 {
text-align: center;
}
type: entities
entities:
- type: custom:button-card
name: Consommation
size: 0px
aspect_ratio: 10/1
show_icon: true
- type: custom:apexcharts-card
cache: true
update_interval: 5min
now:
show: false
label: Maintenant
header:
standard_format: false
show: false
show_states: false
span:
start: day
offset: '-1day'
graph_span: 48h
stacked: true
apex_config:
legend:
show: false
xaxis:
axisBorder:
show: false
axisTicks:
show: false
yaxis:
axisBorder:
show: false
axisTicks:
show: false
fill:
opacity: 1
type: gradient
gradient:
shade: light
type: horizontal
grid:
show: false
series:
- entity: input_number.chauffage_salon_1_index
type: column
name: Salon 1
float_precision: 2
color: 17AB48
opacity: 1
group_by:
duration: 1h
func: diff
show:
datalabels: false
- entity: input_number.chauffage_salon_2_index
type: column
name: Salon 2
float_precision: 2
color: 177DF7
opacity: 1
group_by:
duration: 1h
func: diff
show:
datalabels: false
- entity: input_number.chauffage_sam_index
type: column
name: Salle a Manger
float_precision: 2
color: EA4234
opacity: 1
group_by:
duration: 1h
func: diff
show:
datalabels: false
- entity: input_number.chauffage_pauline_index
type: column
name: Pauline
float_precision: 2
color: F399CA
opacity: 1
group_by:
duration: 1h
func: diff
show:
datalabels: false
- entity: input_number.chauffage_parents_index
type: column
name: Parents
float_precision: 2
color: D3D24C
opacity: 1
group_by:
duration: 1h
func: diff
show:
datalabels: false
style: |
ha-card {
background: var(--background-card-color);
box-shadow: none;
font-size: 1px;
top: -2px;
margin: -18px
}
- type: divider
- type: custom:apexcharts-card
cache: true
update_interval: 5min
chart_type: donut
header:
standard_format: true
show: false
show_states: false
span:
start: day
graph_span: 24h
stacked: false
apex_config:
stroke:
show: true
width: 0.5
fill:
opacity: 1
type: gradient
gradient:
shade: light
type: horizontal
grid:
show: false
series:
- entity: input_number.chauffage_salon_1_index
name: Salon 1
float_precision: 1
color: 17AB48
opacity: 1
group_by:
duration: 1d
func: diff
show:
datalabels: true
- entity: input_number.chauffage_salon_2_index
name: Salon 2
float_precision: 1
color: 177DF7
opacity: 1
group_by:
duration: 1d
func: diff
show:
datalabels: true
- entity: input_number.chauffage_sam_index
name: Salle a Manger
float_precision: 1
color: EA4234
opacity: 1
group_by:
duration: 1d
func: diff
show:
datalabels: true
- entity: input_number.chauffage_pauline_index
name: Pauline
float_precision: 1
color: F399CA
opacity: 1
group_by:
duration: 1d
func: diff
show:
datalabels: true
- entity: input_number.chauffage_parents_index
name: Parents
float_precision: 1
color: D3D24C
opacity: 1
group_by:
duration: 1d
func: diff
show:
datalabels: true
style: |
ha-card {
background: var(--background-card-color);
box-shadow: none;
font-size: 1px;
top: -2px;
margin: -6px
}
show_header_toggle: false
card_mod:
style: |
ha-card {
--ha-card-background: #131313BF;
--ha-card-border-radius: 10px;
# --paper-item-icon-color: #6E6E6E;
# --paper-item-icon-active-color: #44739e;
--mini-media-player-background-opacity:0;
--ha-card-box-shadow: 0px;
--accent-color: #EA4234;
}
Désolé du pavé , amusez vous bien!
@Argonaute je peux déplacer ça dans un nouveau topic si ça t’embête ici