My home energy monitoring is currently uploaded to PVOutput. I have 4 values I can use:
Energy generated
Energy Consumed
Power created (in 5 min increments)
Power used (in 5 min increments)
What PVOutput calculates (but you can’t import into HA via API) is how much of my solar I used (over any 5 min period) from what is generated and how much is exported.
I’ve managed to make some sensors (based on power) that follow the logic:
If Solar generated > power consumed:
Solar used by house = power consumed
Solar exported to grid = Solar generated - power consumed
If Solar generated < Power consumed
Solar used by house = Solar generated
Solar exported to grid = 0
Power consumed from grid = Power used - Solar Generated
How do I create a sensors (assuming this is what I want to add to the energy cards) (measured in kW, total_increasing) that checks the values above in 5 minute increments, starting at 12:02am and resets at 12:00am every day? I would like 3 values please:
Solar exported to grid
Solar used by home
Energy from grid
And also, is it possible to put tariff times and costs in the sensors or do I configure this somewhere else?
That is what template sensors are for. Then feed those to the utility meter.
Also you don’t need to do this if you are using the built in energy dashboard. All you need is:
Grid Consumption:
Should be an energy sensor that is always positive that only shows how much energy you used from the grid. It should not include solar consumption.
Return to Grid:
Should be an energy sensor that is always positive that only shows how much you exported to the grid.
Solar Production:
Should be an energy sensor that is always positive that only shows how much solar energy you produced.
Thanks - my issue is the “data” I have doesn’t split between Solar produced and what portion of it is exported to grid (so it assumes the entire production is exported (at one rate) and I import my entire consumption (at a different rate).
I can calculate how much I use and how much I export - but I don’t know how to create “something” (I am assuming a sensor so I can use in the in the Energy card)
Since about 8:45am I have produced all I have consumed and managed to export to difference (will post another screenshot - just need to wait as a new user)
Sorry - missed the txt bit. Is this what you mean?
sensor.daily_energy_imported_from_grid
Daily_Energy_imported_from_grid
0 state_class: total
unit_of_measurement: Wh
device_class: energy
friendly_name: Daily_Energy_imported_from_grid
sensor.energy_current_hour
Solar production forecast Estimated energy production - this hour
0.699 unit_of_measurement: kWh
device_class: energy
friendly_name: Solar production forecast Estimated energy production - this hour
sensor.energy_next_hour
Solar production forecast Estimated energy production - next hour
0.937 unit_of_measurement: kWh
device_class: energy
friendly_name: Solar production forecast Estimated energy production - next hour
sensor.energy_production_today
Solar production forecast Estimated energy production - today
8.638 unit_of_measurement: kWh
device_class: energy
friendly_name: Solar production forecast Estimated energy production - today
sensor.energy_production_today_remaining
Solar production forecast Estimated energy production - remaining today
7.389 unit_of_measurement: kWh
device_class: energy
friendly_name: Solar production forecast Estimated energy production - remaining today
sensor.energy_production_tomorrow
Solar production forecast Estimated energy production - tomorrow
7.158 unit_of_measurement: kWh
device_class: energy
friendly_name: Solar production forecast Estimated energy production - tomorrow
sensor.macca_s_solar_energy_consumed
Macca's Solar Energy consumed
12909.0 state_class: total_increasing
unit_of_measurement: Wh
device_class: energy
friendly_name: Macca's Solar Energy consumed
sensor.macca_s_solar_energy_generated
Macca's Solar Energy generated
7634.0 state_class: total_increasing
unit_of_measurement: Wh
device_class: energy
friendly_name: Macca's Solar Energy generated
I am not sure if this is what you want and the format? The above is the txt of this