Hello everybody,
I’m wondering if somebody could tell me if I configured my energy dashboard correctly in the way that I did it. Perhaps I can make it easier or perhaps there are still some mistakes.
I’m reading my p1 meter using an DIY P1 meter. https://github.com/daniel-jong/esp8266_p1meter. I’m receiving values using MQTT. My elektricity meter has 2 tarifs, low and high, it’s reading the total of both tarifs seperate.
- platform: mqtt
name: P1 Consumption Low Tariff
unit_of_measurement: 'kWh'
state_topic: "sensors/power/p1meter/consumption_low_tarif"
value_template: "{{ value|float / 1000 }}"
- platform: mqtt
name: P1 Consumption High Tariff
unit_of_measurement: 'kWh'
state_topic: "sensors/power/p1meter/consumption_high_tarif"
value_template: "{{ value|float / 1000 }}"
- platform: mqtt
name: P1 Return Delivery High Tariff
unit_of_measurement: 'kWh'
state_topic: "sensors/power/p1meter/returndelivery_high_tarif"
value_template: "{{ value|float / 1000 }}"
- platform: mqtt
name: P1 Return Delivery Low Tariff
unit_of_measurement: 'kWh'
state_topic: "sensors/power/p1meter/returndelivery_low_tarif"
value_template: "{{ value|float / 1000 }}"
To combine these tariffs i created a template sensor:
- platform: template
sensors:
#Totaal verbruik, hoog en laag.
verbruik_totaal:
friendly_name: Verbruik totaal
unit_of_measurement: kWh
value_template: "{{ states('sensor.p1_consumtie_hoog_tarief')|float + states('sensor.p1_consumtie_laag_tarief')|float }}"
#Totaal teruglevering
teruglevering_totaal:
friendly_name: Teruglevering totaal
unit_of_measurement: kWh
value_template: "{{ states('sensor.p1_teruglevering_laag_tarief')|float + states('sensor.p1_teruglevering_hoog_tarief')|float }}"
This gives me 1 sensor with the total electricity usage of my house, tariff low and high combined and 1 sensor with the combine electricity which I return to the grid.
To log this usage, I created an utility_meter which resets daily:
dagelijks_stroomverbruik_totaal:
source: sensor.verbruik_totaal
cycle: daily
dagelijks_teruglevering_totaal:
source: sensor.teruglevering_totaal
cycle: daily
I’m using the utility_meter in my energy dashboard as grid consumption. I did the same with my grid return from my solar panels. I also added the lifetime energy from my Solaredge inverter integration to the Solar Panels option in the energy dashboard.
I would love to hear if this is the correct way to set this up.
Thank you