Energy, Gas and Water consumption overview

srry. forgot that one :slight_smile:

input_number:
# STROOM TARIEVEN
  all_in_enkeltarief_stroom:
    name: All-in enkeltarief Stroom
    initial: 0.213
    min: 0.000
    max: 0.500
    mode: box
    step: 0.001
    unit_of_measurement: 'EUR per kWh'
  vaste_leveringskosten_stroom:
    name: Vaste leveringskosten Stroom
    initial: 71.39 
    min: 0.00
    max: 100.00
    mode: box
    step: 0.01
    unit_of_measurement: 'EUR per jaar'
  vermindering_energiebelasting_stroom:
    name: Vermindering Energiebelasting Stroom
    initial: -527.17
    min: -600.00
    max: 0.00
    mode: box
    step: 0.01
    unit_of_measurement: 'EUR per jaar'
  netbeheerkosten_stroom:
    name: Netbeheerkosten Stroom
    initial: 252.40
    min: 0.00
    max: 400.00
    mode: box
    step: 0.01
    unit_of_measurement: 'EUR per jaar'
  # GAS TARIEVEN
  all_in_enkeltarief_gas:
    name: All-in enkeltarief Gas
    initial: 0.725 
    min: 0.000
    max: 0.999
    mode: box
    step: 0.001
    unit_of_measurement: 'EUR per m3'
  vaste_leveringskosten_gas:
    name: Vaste leveringskosten Gas
    initial: 71.39
    min: 0.00
    max: 100.00
    mode: box
    step: 0.01
    unit_of_measurement: 'EUR per jaar'
  netbeheerkosten_gas:
    name: Netbeheerkosten Gas
    initial: 191.19
    min: 0.00
    max: 300.00 
    mode: box
    step: 0.01
    unit_of_measurement: 'EUR per jaar'

this is a little insight in one overview of all available sensors and automations. into HA 6 months now. quite proud heheheh.

1 Like

For how long do you collect data? I think why some amounts are negative is because states('input_number.vermindering_energiebelasting_stroom') this is a negative number. I cant see the values so dont know if im right

“usage”- “vermindering energiebelasting”

that must be it then, been running this for a couple of days, guess it needs to run for a bit longer?

Cool theme, witch one is this or did you create it yourself? would you like to share your theme
Found it :grinning: It’s the Transparent Theme

Recently I have been generating power myself and that is why I have redesigned my energy page. The biggest change and improvement are;

  • fold-entity-row for a clean look
  • no tarif price initial value so after restart the price will be the same as before restart
  • Reset button to set the tarif values to default (node-red flow)
    tarief herstel

1 Like

Looking real good! Could you share how you made this view? For example your dayrecord (including date) and all other views you have on this page?

Thank you for this !!!
What is the difference between daily_power and daily_power_short ?
I thought the difference had something to do with the format of the numbers. But in my case they are the same.

Or my figures are not big enough yet :slight_smile:

Does anyone know a way to reset historical data?
For some reason my gas usage a month is sky high and i cannot find the reason for it so i want it to reset all data.
Changing prices etc works perfect except for some reason the result for a month and year are corrupt.

Thanks!
Let me know if you want the configuration of specific part, my configuration is pretty custom beacause the use of DSMR-reader, Node-RED and Inverter that not everyone is uses.

I have also seen this in my utility meters.
I think the reason for this is that not every sensor resets at or before 00:00 (what should be) but at 00:01 or later, the sensor then takes that value to the next day. Can’t prove it, it’s just a guess.

I am migrating all my utility meters and sensor with calculations to Node-RED. I think I have more control and easier to make.

'%.3f'% force is to use three decimal places

1 Like

I was mostly interested in how you made some sensors like total opgewekt / dagerecord opgewekt / stroomstoringen

I’m also using DSMR + Solaredge + own made ESP watermeter. Here my current view:

2 Likes

“Totaal opgewekt” is a SolarEdge sensor from the SolarEdge intergration its called by default sensor.solaredge_lifetime_energy

“Dag Record” sensor is a custom sensor made in Node-RED, if you ar using Node-RED than copy the code below en change entity names to yours.

[{"id":"c818ca4d.da0878","type":"simpletime","z":"41f0d543.7bc6ec","name":"","x":270,"y":1360,"wires":[["41c6c406.a71e0c"]]},{"id":"1d68fc7c.c5bd64","type":"ha-entity","z":"41f0d543.7bc6ec","name":"hoogst opgebracht dag","server":"308f7673.f6317a","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"stroom_dag_record"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":"kWh"}],"state":"payload","stateType":"msg","attributes":[{"property":"datum","value":"datum","valueType":"msg"}],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"block","x":950,"y":1360,"wires":[["9014b07a.edc7e"]]},{"id":"d771eff1.aff16","type":"api-current-state","z":"41f0d543.7bc6ec","name":"stroom vandaag","server":"308f7673.f6317a","version":1,"outputs":2,"halt_if":"payload","halt_if_type":"msg","halt_if_compare":"lt","override_topic":false,"entity_id":"sensor.stroom_dag_record","state_type":"str","state_location":"stroom_dag_record","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":true,"x":560,"y":1360,"wires":[["11903638.27903a"],[]]},{"id":"41c6c406.a71e0c","type":"template","z":"41f0d543.7bc6ec","name":"datum","field":"datum","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{mydom}}-{{mymonth}}-{{myyear}}","output":"str","x":410,"y":1360,"wires":[["d771eff1.aff16"]]},{"id":"4b116d44.40d3c4","type":"server-state-changed","z":"41f0d543.7bc6ec","name":"stroom vandaag","server":"308f7673.f6317a","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.stroom_vandaag_wh_naar_kwh","entityidfiltertype":"exact","outputinitially":true,"state_type":"num","haltifstate":"","halt_if_type":"num","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":100,"y":1360,"wires":[["c818ca4d.da0878"]]},{"id":"9014b07a.edc7e","type":"template","z":"41f0d543.7bc6ec","name":"bericht","field":"bericht","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Er is vandaag {{datum}} {{payload}} kWh opgewekt, dit is een nieuw dagrecord.","output":"str","x":1130,"y":1360,"wires":[["4b61ab07.f4b074","d26852a9.d143b"]]},{"id":"d26852a9.d143b","type":"api-call-service","z":"41f0d543.7bc6ec","name":"In APP Notify","server":"308f7673.f6317a","version":1,"debugenabled":false,"service_domain":"persistent_notification","service":"create","entityId":"","data":"{\"message\":\"{{bericht}}\",\"title\":\"Energie\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1310,"y":1360,"wires":[[]]},{"id":"11903638.27903a","type":"stoptimer","z":"41f0d543.7bc6ec","duration":"18","units":"Minute","payloadtype":"num","payloadval":"0","name":"","x":740,"y":1360,"wires":[["1d68fc7c.c5bd64"],[]]},{"id":"308f7673.f6317a","type":"server","z":"","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

“Stroomstoringen” is a DSMR-Reader sensor

My next project is also to measure water flow, but just have a simple analog water meter. Would you like to share your project in a new post how you did this? especially the hardware

My idea was to follow this step by step guide but maybe you have a better solution.

Thanks!

For the watersensor i can keep it short. Mainly i followed the same tutorial / reading out my watermeter with a print from Thingiverse to hold it in place. I used @cmartens his way of soldering the meter.

with the followeing ESP home code:


esphome:
  name: watermeter
  platform: ESP8266
  board: d1_mini

wifi:
  ssid: "XYZ"
  password: !secret WIFI_Password
  fast_connect: true
  manual_ip:
    static_ip: 192.1.1.1
    gateway: 192.1.1.1
    subnet: 255.255.255.0

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Watermeter Fallback Hotspot"
    password: "password_here"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: !secret API_Password

ota:
  password: !secret OTA_Password
  
sensor:
  - platform: pulse_counter
    pin: 14
    name: "water_per_second"
    update_interval : 1s
    accuracy_decimals: 0
    unit_of_measurement: 'Liter'
    filters:
    - multiply: 0.016666667

More information here -> ESPHome Water meter: convert liter/min to liters per day

1 Like

Where do you put the sensor code, when I put the code in my sensor.yaml, I got all kind of errors… like : is an invalid option for [sensor.template].

That error can be caused by many things, we cannot help you based on this information. Which sensors? what is your code?

Did you made any progres in Node-RED or do you (or anyone else) know a way to start from scratch for this utility meter?

Nice idea! Was also playing around with this!

Some things which I’m facing is that my electricity usage is starting with a negative amount in euro since ‘input_number.vermindering_energiebelasting_stroom’ is a negative value.

More people are facing this?

@ lubbertkramer

How did you made your prognose?

Thanks!

Hi Coen,

before I mess up my config. Another 2 stupid questions here.

1.
Before every textblock you write “utility_meter”, “input_number”, are those “sections” in configuaration.yaml?

2.
The lovelace config, where do I need to placce that? in an entity car dof in the raw config? And for the laater, where :-)?

Ok, have some running :-)…

get this:

Searched for the
“vertical-stack-in-card” but cannot really find it… is it doable via HACS or is there an alternative?