melvanderwal / HA-Amber-Electric-Usage-Charts

Usage charts in Home Assistant for Amber Electric pricing.
7 stars 2 forks source link

Home Assistant - Wholesale Electricity Usage Charts

Usage charts in Home Assistant for Amber Electric or Localvolts pricing


22 January 2024: Added Localvolts version to repo.
18 May 2024: Added negative price support to cost/profit utility meters. Existing users: just add the line delta_values: true to each import cost and export profit utility meter.


This package is used in Home Assistant with the Amber Electric integration or integrated Localvolts pricing to estimate usage in kilowatt hours and dollars. Example charts using the ApexCharts Card HACS frontend integration are included.

Using prices from your wholesale electricity provider integration, import and export prices are recorded at the end of each cost period (30 minutes for Amber, 5 minutes for Localvolts), as well as the cost/profit for each cost period.

Amber-Styled Charts
image

Combined Energy and Cost Charts
image

Prerequisites:

Please note that the values will not match exactly with your wholesale provider's reporting, as:

For example, my inverter typically reports imported and exported power about 2% lower than what is reported by the smart meter to my provider. In the inverter_import_power and inverter_export_power template sensors there is a correctionFactor variable which helps to compensate for this - I have it set to 1.02.

The YAML is provided as a package. It can be implemented as described in the Home Assistant documentation. For example, add the following to configuration.yaml:

# Use packages in /package folder
homeassistant:
  packages: !include_dir_named package

and then copy amber_usage.yaml to config/package/amber_usage.yaml. Do not copy amber_usage_part2.yaml or charts.yaml to the package folder.

For these instructions substitute localvolts_usage.yaml and localvolts_usage_part2.yaml if that is your provider.

Implementation

To get it running, the only changes you should need to make are in the template sensors and the automation.

Notes