ThePrincelle / ha-energy-meter

Provides extended features on top of utility-meter to track costs for each tariff as well as total costs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Energy Meter

GitHub Release License hacs_badge

icon

The Energy Meter integration provides functionality to track consumptions of various utilities, like the builtin Utility Meter. But on top of it, it adds entities to track costs for each tariffs.

Provides extended features on top of the builtin utility meter and energy sensors to track costs for each tariff as well as total costs. It is possible to achieve the same using templates, but it is long and error-prone to do it for every single energy entity you want to track

Example

Installation

HACS - preferred

This repository is compatible with HACS. This is the preferred way to install the custom component.

Manual

  1. Download the release zip from releases pages
  2. Copy it within <HA config dir>/custom_components/energy_meter
  3. Unzip in place
  4. Restart Home Assistant

Configuration

The configuration of the component is mostly the same as the builtin utility_meter integration: https://www.home-assistant.io/integrations/utility_meter/

The only difference is the addition of price and price_entity options:


price float (optional)

The static price of the tariff (in currency/kWh)


price_entity string (optional)

The entity ID of a sensor giving the current price of the tariff (in currency/kWh)


The price must be given in currency/kWh. It depends on your currency configuration. For instance, if your configured currency is dollar, it must be in $/kWh.

Only one of price or price_entity should be given. If both are given, price_entity would have precedence. If none is defined, this integration will act as a basic utility meter, with no cost tracking.

Example

energy_meter:
  daily_energy:
    source: sensor.energy
    name: Daily Energy
    cycle: daily
    price_entity: sensor.current_energy_price
    tariffs:
      - peak
      - offpeak
  monthly_energy:
    source: sensor.energy
    name: Monthly Energy
    cycle: monthly
    price: 0.20
    tariffs:
      - peak
      - offpeak

Usually, source energy sensors shares the same price. In order to prevent configuration issues when changing it in a config, it is advised to use the anchor feature of YAML:

energy_meter:
  daily_energy:
    source: sensor.energy
    name: Daily Energy
    cycle: daily
    price_entity: &entity-price sensor.current_energy_price
    tariffs:
      - peak
      - offpeak
  monthly_energy:
    source: sensor.energy
    name: Monthly Energy
    cycle: monthly
    price: *entity-price
    tariffs:
      - peak
      - offpeak

About

Provides extended features on top of utility-meter to track costs for each tariff as well as total costs

License:MIT License


Languages

Language:Python 97.3%Language:Shell 2.7%