BC hydro Bill refrence template

i’m have read almost every forum on this community page and i cant figure out how to get a fairly accurate bill predicition for my utlity bill. My provider bills bi monthly so I imagine i would use a cron instead of a cycle in the config.

Cron: " 23 59 5 2,4,6,8,10,12 * " in the utility meter config.

My utility provider also does a 2 tier system where the first 1350 kwH are billed at $0.0975 and the rest is billed at $0.1405

after building the utitlity meter i am still unsure how to define the rates for the utility meter so its calculating correctly.

I do have a emporia vue 2 on my main feed which is running in watts. I have created a Integration - Riemann sum integral sensor that spits out kilowatt hours but everytime i try to create a rolling dollar value to simulate what my bill is currently at its either wildly inaccurate or wont roll at all.

has anyone built a similar template?

Your hours and minutes are back to front in that cron expression. Try 59 23 5 1/2 *

Not sure if that month notation works with the Utility Meter though

oh sorry i did have that in the yaml just tryped it out on memorization and mixed it up, but i used that website to get to that number. But i seen some other forums and they had * * at the end but i’m not sure why its even needed

utility_meter:
  energy:
    source: sensor.energy_meter
    cron: " 59 23 5 2,4,6,8,10,12 * "

sensor:
  - platform: template
    sensors:
      energy_cost:
        friendly_name: "Energy Cost"
        unit_of_measurement: "CAD/kWh"
        value_template: >
          {% set energy_usage = states('sensor.energy') | float %}
          {% if energy_usage <= 1350 %}
            {{ (0.0975) | round(2) }}
          {% else %}
            {{ (0.1405) | round(2) }}
          {% endif %}

I think I got it working. anyone who uses BC hydro for an accurate billing refrence use this :slight_smile:

# Utility Meter Configuration
utility_meter:
  energy_bi_monthly:
    source: sensor.energy_usage_kwh
    cycle: bi-monthly
    billing_day: 5
    billing_hour: 23
    cron: "0 0 6 2,4,6,8,10,12 *"

# Sensor Configuration
sensor:
  - platform: integration
    source: sensor.power_usage_watts
    name: "energy_usage_kwh"
    unit_prefix: k
    round: 2
    method: left

  - platform: template
    sensors:
      current_bill:
        friendly_name: "Current Bill"
        unit_of_measurement: "CAD"
        value_template: >
          {% set energy_usage = states('sensor.energy_usage_kwh') | float %}
          {% if energy_usage <= 1350 %}
            {{ (energy_usage * 0.0975) | round(2) }}
          {% else %}
            {{ (1350 * 0.0975 + (energy_usage - 1350) * 0.1405) | round(2) }}
          {% endif %}

Thanks for doing this work. I have the original Rainforest Eagle 100 device as well as the current Powerley Energy Bridge device and could never quite get the cost figures to work out either :slight_smile: One note though - the Step 2 rate is actually $0.1408/kWh - at least in northern BC where I live.

ohh yes you are correct, thanks for noticing the typo, let me know if it works for you as i’m still waiting for my bill to come out. I also added a .25 cent base charge to my yaml

      current_bill:
        friendly_name: "Current Bill"
        unit_of_measurement: "CAD"
        value_template: >
          {% set energy_usage = states('sensor.energy_usage_kwh') | float %}
          {% set energy_cost = 0 %}
          
          {% if energy_usage <= 1350 %}
            {% set energy_cost = (energy_usage * 0.0975) %}
          {% else %}
            {% set energy_cost = (1350 * 0.0975 + (energy_usage - 1350) * 0.1408) %}
          {% endif %}
          
          {% set daily_charge = 0.25 %}
          
          {{ (energy_cost + daily_charge) | round(2) }}

@Manbearpig92 Curious how you came up with the 5th day of the month. I looked at my bills back to last May and I can’t find any consistency in day of month, day of week, or number of days in billing period. They’re all close but not the same. I thought it might just be the leap year but you can see that they’re inconsistent even in 2023.

May 30 - Jul 27 - 59 Days
Jul 28 - Sep 27 - 62 Days
Sep 28 - Nov 28 - 62 Days
Nov 29 - Jan 29 - 63 Days
Jan 30 - Mar 28 - 59 Days

hmm, imagine that. I looked back as well and didnt realize they staggered randomly as well. mine are all to the 5th except for the ones before august. I think i’m going to set up my eagle rainforest to reset the meter on the condition when the price goes from 14cents down to 9

Well, I’m sorry to hear we’re saddled with the same issue, but glad to hear that I’m not insane…

I got rid of my eagle and went with a CT clamp based system so I could monitor actual legs as well as the total consumption. I guess I’ll need to come up with another way to automate resetting when the billing period ends.

yeah i’m gonna work on it again shortly, have you found a solution by chance? also i still gotta figure out where i went wrong as the meter isnt resetting for me at those dates that i specified