Slightly changed dashboard :
1:
type: vertical-stack
cards:
- type: gauge
entity: sensor.p1_meter_active_power
max: 5000
name: Actueel verbruik
min: -5000
severity:
green: 600
yellow: 2000
red: 3000
- type: glance
entities:
- entity: sensor.p1_meter_total_power_export_t1
- entity: sensor.p1_meter_total_power_import_t1
state_color: false
- type: entities
entities:
- entity: input_number.t2_energy_cost
- entity: input_number.t1_energy_cost
- entity: input_number.gas_energy_cost
title: Tarieven
2:
type: vertical-stack
cards:
- type: entity
entity: sensor.energy_gas_en_elektriciteit_eur
name: Totale netto kosten energie (electro + gas) - opbr zon
icon: 'mdi:currency-eur'
- type: entity
entity: sensor.energy_export_total_dagelijks_eur
name: Opbrengst zonnepanelen
- type: entity
entity: sensor.energy_import_total_dagelijks_eur
name: Electriciteitskosten vandaag
- type: entity
entity: sensor.energy_gass_eur
name: Gas kosten vandaag
3:
type: vertical-stack
cards:
- type: entities
entities:
- entity: sensor.p1_meter_total_power_export_t1
- entity: sensor.p1_meter_total_power_export_t2
- entity: sensor.p1_meter_total_power_import_t1
- entity: sensor.p1_meter_total_power_import_t2
- entity: sensor.p1_meter_total_gas
title: Meterstanden
- type: entities
entities:
- entity: sensor.energy_export_total_dagelijks_kwh
- entity: sensor.energy_import_total_dagelijks_kwh
- type: entities
entities:
- entity: sensor.energy_export_t2_dagelijks_eur
- entity: sensor.energy_export_t1_dagelijks_eur
title: Zonnepanelen
3 Likes
skank
January 31, 2021, 8:01pm
116
oh boy, i would love to get it like that…
is that possible with the integrated dsmr slimme meter too?
This is my Mobile View at the moment.
3 Likes
iMatth
February 1, 2021, 11:27pm
118
Nice one, did u managed to make the sum of the T1 & T2 meter? And in what way are u able to count ‘per dag’ & ‘per week’?
Thanks for sharing!
You need to create utility meters:
You can also create yearly in a easy way if you want just change the cycle to yearly
##############################
## Utility Meter ##
##############################
utility_meter:
energy_import_t2_dagelijks:
source: sensor.p1_meter_total_power_import_t2
cycle: daily
energy_import_t1_dagelijks:
source: sensor.p1_meter_total_power_import_t1
cycle: daily
energy_import_t2_wekelijks:
source: sensor.p1_meter_total_power_import_t2
cycle: weekly
energy_import_t1_wekelijks:
source: sensor.p1_meter_total_power_import_t1
cycle: weekly
energy_import_t2_maandelijks:
source: sensor.p1_meter_total_power_import_t2
cycle: monthly
energy_import_t1_maandelijks:
source: sensor.p1_meter_total_power_import_t1
cycle: monthly
# energy_export_t2_dagelijks:
# source: sensor.p1_meter_total_power_export_t2_kwh
# cycle: daily
# energy_export_t1_dagelijks:
# source: sensor.p1_meter_total_power_export_t1_kwh
# cycle: daily
energy_gas_dagelijks:
source: sensor.p1_meter_total_gas
cycle: daily
energy_gas_wekelijks:
source: sensor.p1_meter_total_gas
cycle: weekly
energy_gas_maandelijks:
source: sensor.p1_meter_total_gas
cycle: monthly
And a couple of sensors:
sensor:
##############################################
## ELEKTRA ##
##############################################
- platform: template
sensors:
energy_import_t2_dagelijks_eur:
friendly_name: 'Dagelijkse kosten nomaal tarief (T2)'
value_template: "{{ (states('sensor.energy_import_t2_dagelijks')|float * states('input_number.t2_energy_cost')|float)|round(2) }}"
unit_of_measurement: "€"
- platform: template
sensors:
energy_import_t2_wekelijks_eur:
friendly_name: 'Wekelijkse kosten nomaal tarief (T2)'
value_template: "{{ (states('sensor.energy_import_t2_wekelijks')|float * states('input_number.t2_energy_cost')|float)|round(2) }}"
unit_of_measurement: "€"
- platform: template
sensors:
energy_import_t2_maandelijks_eur:
friendly_name: 'Maandelijkse kosten nomaal tarief (T2)'
value_template: "{{ (states('sensor.energy_import_t2_maandelijks')|float * states('input_number.t2_energy_cost')|float)|round(2) }}"
unit_of_measurement: "€"
##############################################
- platform: template
sensors:
energy_import_t1_dagelijks_eur:
friendly_name: 'Dagelijkse kosten dal tarief (T1)'
value_template: "{{ (states('sensor.energy_import_t1_dagelijks')|float * states('input_number.t1_energy_cost')|float)|round(2) }}"
unit_of_measurement: "€"
- platform: template
sensors:
energy_import_t1_wekelijks_eur:
friendly_name: 'Wekelijkse kosten dal tarief (T1)'
value_template: "{{ (states('sensor.energy_import_t1_wekelijks')|float * states('input_number.t1_energy_cost')|float)|round(2) }}"
unit_of_measurement: "€"
- platform: template
sensors:
energy_import_t1_maandelijks_eur:
friendly_name: 'Maandelijkse kosten dal tarief (T1)'
value_template: "{{ (states('sensor.energy_import_t1_maandelijks')|float * states('input_number.t1_energy_cost')|float)|round(2) }}"
unit_of_measurement: "€"
##############################################
- platform: template
sensors:
energy_import_total_dagelijks_eur:
friendly_name: 'Dagelijkse kosten dal + normaal'
value_template: "{{ (states('sensor.energy_import_t2_dagelijks_eur')|float + states('sensor.energy_import_t1_dagelijks_eur')|float)|round(2) }}"
unit_of_measurement: "€"
- platform: template
sensors:
energy_import_total_wekelijks_eur:
friendly_name: 'Wekelijkse kosten dal + normaal'
value_template: "{{ (states('sensor.energy_import_t2_wekelijks_eur')|float + states('sensor.energy_import_t1_wekelijks_eur')|float)|round(2) }}"
unit_of_measurement: "€"
- platform: template
sensors:
energy_import_total_maandelijks_eur:
friendly_name: 'Maandelijkse kosten dal + normaal'
value_template: "{{ (states('sensor.energy_import_t2_maandelijks_eur')|float + states('sensor.energy_import_t1_maandelijks_eur')|float)|round(2) }}"
unit_of_measurement: "€"
##############################################
- platform: template
sensors:
energy_import_total_dagelijks_kwh:
friendly_name: 'kWh vandaag dal + normaal'
value_template: "{{ (states('sensor.energy_import_t1_dagelijks')|float + states('sensor.energy_import_t2_dagelijks')|float)|round(2) }}"
unit_of_measurement: "kWh"
- platform: template
sensors:
energy_import_total_wekelijks_kwh:
friendly_name: 'kWh wekelijks dal + normaal'
value_template: "{{ (states('sensor.energy_import_t1_wekelijks')|float + states('sensor.energy_import_t2_wekelijks')|float)|round(2) }}"
unit_of_measurement: "kWh"
- platform: template
sensors:
energy_import_total_maandelijks_kwh:
friendly_name: 'kWh maandelijks dal + normaal'
value_template: "{{ (states('sensor.energy_import_t1_maandelijks')|float + states('sensor.energy_import_t2_maandelijks')|float)|round(2) }}"
unit_of_measurement: "kWh"
##############################################
## GAS ##
##############################################
- platform: template
sensors:
energy_gas_daily_eur:
friendly_name: 'Dagelijkse kosten gas'
value_template: "{{ (states('sensor.energy_gas_dagelijks')|float * states('input_number.gas_energy_cost')|float)|round(2) }}"
unit_of_measurement: "€"
- platform: template
sensors:
energy_gas_weekly_eur:
friendly_name: 'Wekelijkse kosten gas'
value_template: "{{ (states('sensor.energy_gas_wekelijks')|float * states('input_number.gas_energy_cost')|float)|round(2) }}"
unit_of_measurement: "€"
- platform: template
sensors:
energy_gas_monthly_eur:
friendly_name: 'Maandelijkse kosten gas'
value_template: "{{ (states('sensor.energy_gas_maandelijks')|float * states('input_number.gas_energy_cost')|float)|round(2) }}"
unit_of_measurement: "€"
##############################################
## Totale netto kosten (Gas + electra) ##
##############################################
- platform: template
sensors:
energy_gas_en_elektriciteit_dagelijks_eur:
friendly_name: 'Totale netto dag kosten energie'
value_template: "{{ (states('sensor.energy_gas_daily_eur')|float + states('sensor.energy_import_total_dagelijks_eur')|float)|round(2) }}"
unit_of_measurement: "€"
- platform: template
sensors:
energy_gas_en_elektriciteit_wekelijks_eur:
friendly_name: 'Totale netto week kosten energie'
value_template: "{{ (states('sensor.energy_gas_weekly_eur')|float + states('sensor.energy_import_total_wekelijks_eur')|float)|round(2) }}"
unit_of_measurement: "€"
- platform: template
sensors:
energy_gas_en_elektriciteit_maandelijks_eur:
friendly_name: 'Totale netto maand kosten energie'
value_template: "{{ (states('sensor.energy_gas_monthly_eur')|float + states('sensor.energy_import_total_maandelijks_eur')|float)|round(2) }}"
unit_of_measurement: "€"
3 Likes
iMatth
February 3, 2021, 8:22am
120
Thanks for the info. Dashboard made with Grafana?
Nope only mini graph cards in a stack
Repreducing the graphs from the P1 Energy Meter app in HA.
Still a work in prgress.
5 Likes
Guess you’re using: apexcharts-card looks smooth…
Yes, great custom card, lots of options and many new lately …
Can you share that one, so I can also play with it…
sure, here it is:
type: 'custom:apexcharts-card'
graph_span: 7d
span:
end: day
header:
show: true
title: Totale energie kosten per dag in €
apex_config:
chart:
type: area
height: 315
stroke:
show: true
width: 1
curve: smooth
legend:
show: true
dataLabels:
enabled: true
fill:
type: gradient
gradient:
shadeIntensity: 0.1
opacityFrom: 0.25
opacityTo: 1
inverseColors: true
stops:
- 0
- 90
- 100
series:
- color: 'rgb(138,43,226)'
entity: sensor.energy_gas_en_elektriciteit_eur
type: column
group_by:
func: max
duration: 24h
1 Like
based on the work of @hreedijk , I did also a rebuild of the graphs, still work in progress…
5 Likes
Can you share your code please. It looks really nice
1 Like
Yes, code is not really clean as it’s work in progress as I’m testing with the settings and those are numerous.
First one:
type: 'custom:apexcharts-card'
graph_span: 1h
cache: true
apex_config:
plotOptions:
bar:
columnWidth: 10%
legend:
showForSingleSeries: false
fill:
type: solid
opacity: 0.2
stroke:
width: 1
chart:
height: 250px
zoom:
enabled: true
toolbar:
show: false
tools:
zoom: false
zoomin: false
zoomout: false
pan: false
reset: true
xaxis:
labels:
format: 'HH:mm'
header:
show: true
show_states: true
colorize_states: true
series:
- entity: sensor.p1_meter_active_power
type: area
name: Huidig Stroom Verbruik
curve: stepline
group_by:
func: raw
duration: 1m
Second one:
type: 'custom:apexcharts-card'
graph_span: 7d
update_interval: 5m
cache: true
span:
end: day
offset: '-1sec'
header:
show: true
title: Gas en Stroom verbruik per dag
apex_config:
xaxis:
labels:
format: dd-MM
show: true
showAlways: true
yaxis:
forceNiceScale: false
decimalsInFloat: 0
min: 0
chart:
type: area
height: 300
stroke:
show: true
width: 1
legend:
show: true
dataLabels:
enabled: false
distributed: true
fill:
type: gradient
gradient:
shadeIntensity: 0.1
opacityFrom: 0.25
opacityTo: 1
inverseColors: true
stops:
- 0
- 90
- 100
series:
- entity: sensor.energy_import_total_dagelijks_kwh
type: column
name: Stroom
float_precision: 2
group_by:
func: max
duration: 23h59m59s
- entity: sensor.energy_gas_dagelijks
name: Gas
type: column
float_precision: 2
group_by:
func: max
duration: 23h59m59s
Tirth one:
type: 'custom:apexcharts-card'
graph_span: 7d
update_interval: 5m
cache: true
span:
end: day
offset: '-1sec'
header:
show: true
title: Totale energie kosten per dag in €
apex_config:
xaxis:
labels:
format: dd-MM
show: true
showAlways: true
yaxis:
forceNiceScale: false
decimalsInFloat: 0
chart:
type: area
height: 300
stroke:
show: true
width: 1
legend:
show: true
dataLabels:
enabled: false
distributed: true
fill:
type: gradient
gradient:
shadeIntensity: 0.1
opacityFrom: 0.25
opacityTo: 1
inverseColors: true
stops:
- 0
- 90
- 100
series:
- entity: sensor.energy_import_total_dagelijks_eur
type: column
name: Stroom
float_precision: 2
group_by:
func: max
duration: 24h
- entity: sensor.energy_gas_daily_eur
name: Gas
float_precision: 2
type: column
group_by:
func: max
duration: 24h
- color: 'rgb(128,128,128)'
entity: sensor.energy_gas_en_elektriciteit_dagelijks_eur
type: column
name: Totaal
float_precision: 2
group_by:
func: max
duration: 23h59m59s
3 Likes
skank
February 6, 2021, 8:43pm
132
Nice,
How would you do the third one for:
a graph showing monthly usage for gas, elec consumed and elec produced?
And per year?
good question, lacking history so makes it a bit difficult to get some figures for that, but should be possible. will see if I can make something of it…