martinarva / dynamic_energy_cost

72 stars 15 forks source link

Dynamic Energy Cost Integration for Home Assistant

This Home Assistant custom integration provides a sophisticated real-time and cumulative energy cost tracking solution, ideal for monitoring electricity expenses related to fluctuating prices and varying energy consumption levels. It's specifically crafted to handle dynamic electricity prices such as those from Nordpool.

Features

Best Practices

Calculating energy cost from an energy (kWh) sensor is the more precise and recommended method. If an energy sensor is available, it is advisable to use this option for accuracy comparable to the Home Assistant Energy Dashboard. If no kWh sensor is available, the integration can alternatively use a power (W) sensor.

Note: It is important that only one type of sensor (either power or energy) is configured for this integration. Both cannot be used simultaneously.

Resetting the cost sensors

Dynamic Energy Cost provides a service dynamic_energy_cost.reset_cost which you can call to reset energy sensors to 0. You can call this service from the GUI (Developer tools -> Services) or use this in automations.

service: dynamic_energy_cost.reset_cost
target:
  entity_id: sensor.your_sensor_entity_id

Prerequisites

Installation

Semi-Manual Installation with HACS

  1. Go HACS integrations secction.
  2. Click on the 3 dots in the top right corner.
  3. Select "Custom repositories"
  4. Add the URL (https://github.com/martinarva/dynamic_energy_cost) to the repository.
  5. Select the integration category.
  6. Click the "ADD" button.
  7. Now you are able to download the integration

Manual Installation

Download and Prepare:

  1. Access the GitHub repository for this integration.
  2. Download the ZIP file of the repository and extract its contents.
  3. Copy the dynamic_energy_cost folder into the custom_components directory located typically at /config/custom_components/ in your Home Assistant directory.

Restart Home Assistant:

Configuration via UI

Add Integration:

  1. Navigate to Settings > Devices & Services.
  2. Click Add Integration and search for "Dynamic Energy Cost".
  3. Select the Dynamic Energy Cost integration to initiate setup.

Configure Sensors:

Updating

To update the integration to a newer version:

  1. Access the GitHub repository for this integration.
  2. Download the latest ZIP file of the repository and extract its contents.
  3. Overwrite the dynamic_energy_cost folder into the custom_components directory located typically at /config/custom_components/ in your Home Assistant directory.

Support

For support, additional instructions, or to report issues, please visit the GitHub issues page associated with this repository. Home Assitant Community topic: https://community.home-assistant.io/t/dynamic-energy-cost/726931