No that doesn’t work.
First you need to create the kWh-sensor:
- platform: integration
name: net_elect_kwh
source: sensor.p1_net_electricity_point
unit_prefix: k
unit_time: h
round: 1
Change to name to you liking.
This should give you the kWh-sensor that you can use in the next step, in creating the kWh-counters for a day, week, etc. using the Utility Meter integration.
Johannes, I’m always happy to help but with this type of short and undetailed feedback I am unable to help you. Please show the yaml-code that you are using, show history-graphs that show the result of a sensor over time, etc.
Also, what is your goal, and why do you want to use the sensor.p1_net_electricity_point as the basis?
Sorry you are right,
What I am trying to achieve is to visualize and register my power usage, (per day)
I already have my solar panels working. But below at the right, ‘energie verbruik vandaag’ stays around 0-1, while my P1 (smile) current has -10 registered .
sensor.p1_net_electricity_point
is the sensor (combined low+high tariff) energy usage in Watt (see image upper right 'stoom verbruik huidig)
As you can see it peaks when I charge my E car (red) and green when PV is delivering power.
Now I want to have a ‘day’ ‘month’ and ‘year’ usage based on that : sensor.p1_net_electricity_point
I try :
in sensor :
platform: integration
source: sensor.p1_net_electricity_point
name: energie per dag
unit_prefix: k
unit_time: h
round: 1
How does the history graph of the energie_per_dag sensor look like?
For this sensor I’m thinking maybe it’s better to use round: 3, this should result in a higher resolution.
it should be giving 11,92kwh --> got this from P1 smile app on iPhone , but it shows 1,43 (still have to wait to see if it goes below zero (later today when the sun start shining) but as you can see yesterday it also did not go <0
I’m not asking about the sensor.dag_energie_verbruik, I’m asking for info on the sensor.energie_per_dag.
I wonder what the integration function is doing with the input from the p1_net_electricity_point sensor. Maybe something goes wrong in that first step.
Ok thanks. Looks like the Utility Meter doesn’t know how to handle the negative part of the curve.
So that’s not gonna work.
I’m thinking, use this
- platform: integration
name: dag_energie_verbruik
source: sensor.energie_per_dag
unit_time: d
For the day sensor.
And use the P1 cumulative consumption and production (kWh) numbers in automations for the week and month numbers. Maybe better to use an automation for the day numbers as well.
Update: I’ve looked in the code of Utility Meter, looks like a negative diff is not allowed, which cause the issue that you see in your result. I’m asking @dgomes on Discord what is the reason for this “bug”.