Emporia Vue + Ontario Energy Board Integration + Individual Tariffs

Hello,

I recently bought the Emporia Vue 2 monitoring and I installed it successfully. I also integrated with Home Assistant and the data is coming. I also installed the Ontario Energy Board integration from here GitHub - jrfernandes/ontario_energy_board: Home Assistant component that installs a sensor with the current energy rate for Ontario energy companies.

Now, the Ontario Energy Board gives me an entity that brings dynamically the cost of the kWh depending on the day/time of usage, it includes Attributes for Off Peak, On Peak, Mid Peak rates, among other useful attributes.

When I setup my Energy Dashboard I select the Vue sensor for the Consumed Energy and in the tracking of prices, I selected “Use an Entity with Current Price” and I selected the Ontario Energy Board entity. So far, the dashboard is showing me the dollar amount of the electricity consumed, I am assuming Home Assistant is tracking when the price on that entity changes and adapts the dollar amount accordingly.

What I would like is to show in my Energy dashboard the dollar amount per Time of Use, I don’t want the Energy Dashboard to just show me the total consumption/dollars.

I understand we have the Utility Meter helper, however I don’t know how to set it up if I already have an entity that is dynamically tracking the prices and it is giving me the attributes that show the different prices.

Do you guys know what I can do to extract the attribute of the different peak rates and tell HA to show me the consumption/dollar amount for each tariff in the Energy Dashboard?

Thanks!.

I managed to solve this and created a guide in case anyone is interested.

Here it goes:

I live in Ontario, Canada, and recently bought and installed an Emporia Vue 2.
I successfully integrated in Home Assistant using Magico13’s Emporia (cloud) integration via HACS as I don’t have experience with ESP nor soldering circuit boards.

The people that lives in Ontario knows that our power companies use (mostly, as there also other less used options) Time of Use as billing/tariff methods.
We basically have 3 tiers, On, Off and Mid peaks. The peaks are hourly and type of day values, example, 7pm to 7am is off-peak, but Weekends and Holidays all days are off-peak. On top of that there are Seasons in which the 3 different tiers have different prices, example Off-Peak in Summer cost differently than Off-Peak in Winter.

This is basically a nightmare to configure in Home Assistant, until I found jrfernandes Github with the Ontario Energy Board data for all Power Companies in Ontario.
This integration lets you select your Power Company and will automatically bring the current Peak cost and tons of other Attributes, including all current Peak rates, Season, Active Peak, etc.

With the OEB and the Vue integration I was able to configure the Energy Dashboard, the Dashboard would automatically get the current Peak rate and give you the dollar amount of the kW/h you have been consuming, when the OEB switched the Peak rate (off-peak to on-peak), the Dashboard would just continue to reference the same entity and the consumed kW/h would be calculated with the updated rate.

That solved a lot, but it is not good enough, as it would give you the total dollar value and the total energy consumption, you wouldn’t know how much you consumed during each Peak and how much did each Period costed you.

This is how I managed to do it.

  1. Template in the config file to extract each peak rate attribute from the OEB entity and convert the attribute to a sensor (I created 3 sensors, one for each peak rate, example below).
sensor:
 - platform: template
   sensors:
      alectra_off_peak_rate:
      friendly_name: "Alectra Off Peak Rate"
      unit_of_measurement: "CAD/kWh"
      value_template: "{{ state_attr('sensor.alectra_utilities_corporation','off_peak_rate') }}"
  1. Created Utiliy Meter Helpers.
    When creating/configuring the Utility Meter I selected the Vue (daily input) as the Input Sensor, my meter reset cycle is 30 days and I created 3 tariffs, On-Peak, Off-Peak and Mid-Peak.

When you finish configuring the Utility Meter, 4 helpers will be created, 3 sensors (one for each peak) and 1 Select helper, my helpers are named Vue_Power_Consumption_on_peak, off_peak, mid_peak and the Select is just Vue_Power_Consumption.

  1. Automations to tell the Select Helper (Vue_Power_Consumption) what is the current peak based on the OEB Active Peak attribute.

I created 3 Automations, one for each peak, example below:

When Active Peak of Alectra Utilities Corporation changes TO on_peak
Set VUE_Power_Consumption to on-peak

YAML:

alias: Alectra-Vue-Power-Consumption On-Peak
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.alectra_utilities_corporation_rate_zone_residential_rate
    attribute: active_peak
    to: on_peak
condition: []
action:
  - service: select.select_option
    data:
      option: on-peak
    target:
      entity_id: select.vue_power_consumption
mode: single

With the Select Helper knowing what is the current Peak automatically, I solved the problem off managing times of day and type of day rates, it all happens automatically now!

  1. The last step was configuring the Energy Dashboard.
    On the Energy Dashboard configuration page, I added 3 Grid consumptions, basically the 3 utility meter helpers I created on step2.

Consumed Energy: Vue_Power_Consumption_on_peak
and then “Use an Entity with the current price:” (The Peak sensors that I created with the Template on step 1): Alectra On Peak Rate

That’s it! The Energy Dashboard will display the 3 sources, Off, On and Mid Peaks with the Energy consumed in each peak and the cost associated.
You will also get a Grid Total that sums all the sources.

I also added the Vue as a Individual Device to easy monitor the total Energy consumption, it should match the Grid Total value.

Anyway, it took me a couple of days to figure all this out by watching youtube videos and reading forums. I know there are a lot of Ontario folks using HA that were asking similar questions, which is why I built this. Just FYI, I am not monitoring each circuit in my house, I am just monitoring the main phases (in Ontario is split phase, 2 hots).

Additional note: the OEB integration also includes everything that technically comes in the Energy Bill of your company, including tax percentage, delivery price and all other necessary attributes to calculate your electrical bill, I didn’t this in my calculation, I tried to understand how the delivery was calculated but I don’t think I understood it well enough, if someone wants to share below how, feel free.

2 Likes

Holy crap thank you for this !!
My son and I have been trying to program this.
I am working on adding the TOU totals now…still learning !

Just wanted to add to this for anyone else looking I did this with helper numbers to set the price of hydro. it does not change enough to need to get. it from an API. I did create a template that auto selects the TOU period and then set the Utility meter select to this value. Very simple way without using the OEB API

Hope this gives others lots of ideas. I used mine to track only the price for a single item but you could do it for your main energy reading obviously!!