I currently track the amount of energy I import from the grid into my home on an hourly basis. This is because in California, we have to pay a Non-Bypassalbe Charge for all power we import when using solar. All calculations are done on hourly basis, netting out any power I put back into the grid. I am using the following to track that import:
utility_meter:
house_energy_net_import_hourly:
name: house Energy Net Import Hourly
source: sensor.house_energy_net_import
cycle: hourly
which gives me a nice saw-tooth pattern of data over the day. But what I really need is a summation of the values at the end of each hour (top of each saw-tooth). So 24 data points added together for each day giving me to total power I actually imported that day. What is the best way to do that? Some way to add the values at xx:59:59 (one second before each hour) for each day?
This additional sensors should give you the daily and monthly net import
utility_meter:
House_energy_net_import_daily:
name: house Energy Net Import Daily
source: sensor.house_energy_net_import
cycle: daily
House_energy_net_import_monthly:
name: house Energy Net Import Monthly
source: sensor.house_energy_net_import
cycle: monthly
Here are what my three sensor of total energy look like just a few minutes ago. Waiting for my utility to commission the system and give permission to operate so I don’t have the solar input yet.
@AllHailJ , thanks for the reply. Unfortunately, all calculations must be done hour by hour due to how PGE (my power company) calculates NBCs (non-bypassable charges). This is a unique quirk of how power companies charge people with solar panels in California (Net Metering).
For exmaple, on a daily basis, if I use 24kWh of power, but also generate 24kWh of power from solar, then my net metering is 0 and I owe them nothing for power. However, the power companies are very tricky and charge you a fee for each kWh of energy that you borrow during the day between hours.
So if from 7am to 8am I use a net of 1kWh, I am charged a fee for borrowing that power, even if I have a net surplus in the following hour. So all calculations must be done hour by hour, then summed up afterward on a daily and monthly basis.
Thanks so much, @AllHailJ !! I ended up taking your ideas and putting into an automation, and ensuring I only add positive values of import. You are a star!
I’ve found that with SDG&E, my total imported kWh match what they are charging me for in NBCs. Any solar energy I directly consume will not get counted as imported, so I don’t have to track things separately.
Are you still tracking your NBCs like you outlined above? I use the Energy dashboard to get an idea of my imported/exported costs, which gets me close enough to the Net Metering numbers on my bill.
Is there a way to get the total sum of those values from the Energy integration to use in my own sensor? I guess I should be storing this information elsewhere so I can add the NBC costs and have a sum of my charges since True Up.