A whole-house energy meter built from smart plugs

Smart plugs on the big loads, a model for the rest, and time-of-use maths in Home Assistant, so every circuit shows what it really costs.

The Power page on a phone. Four cards: Using right now, in watts with the cost in cents an hour; Today so far, in dollars with the figure it's on track for; Biggest users today, as bars in kWh for the dryer, dishwasher, hallway board, theatre, lounge TV, beer fridge, fridge and dining; and This week vs last, as bars by weekday.
Difficulty
Moderate
Parts cost
One power-metering Zigbee smart plug per big load, plus Home Assistant
Build time
Set up in stages as the plugs go in, then tuned against a real bill
Skills
Home Assistant, Templates, Zigbee

The problem

I wanted to see what the house was using, and what it was costing, without putting a meter on the switchboard. There is no single meter. Every big load sits on a power-metering smart plug, and those readings add up to the house figure.

The first version had no measurement at all. It was a model: every bulb, fan and appliance as a number in Home Assistant, added up. It worked, but about three quarters of the headline figure was my guesswork, so I put the split on the dashboard where nobody could mistake it for a real meter.

Then a batch of power-metering Zigbee smart plugs arrived. With 8 plugs on the big loads, the house figure went from mostly guesswork to 96% measured (368 W of a 381 W total on the day I switched over). The model now only covers what a plug can’t measure.

The second half of the job was money. We’re on a time-of-use plan, and peak power costs over six times what midday power costs. A flat cents-per-kWh figure was badly wrong, so the costs had to know when the power was used.

How it works

How the house gets an energy meter without a meter Zigbee smart plugs measure the big loads, and a model estimates the rest: the lights from their on state and brightness, a fan from its speed, and the aircon in summer only. Home Assistant adds them into one live house power figure in watts, then integrates that into kilowatt-hours. Utility meters split the kilowatt-hours by tariff period, and an automation switches the period at 9 am, 3 pm and 9 pm and again whenever Home Assistant starts. Super Off Peak runs 9 to 3 at 8.852 cents, Peak 3 to 9 at 55.3253 cents, and Off Peak 9 at night to 9 in the morning at 24.3431 cents. Today's cost prices each period at its own rate and adds the daily supply charge. Weekly, monthly and per-device costs use a blended rate: the real cost of the house's kilowatt-hours divided by how many there were. The live cost-per-hour gauges are the only thing that uses the rate right now. Smart plugs measured: the big loads, real watts Model lights, fan, and aircon (summer only) House power (W) plugs + model, live House energy (kWh) watts added up over time Tariff meters switched at 9:00, 15:00, 21:00 and on start Super Off Peak 9–15 8.85 c/kWh Peak 15–21 55.33 c/kWh Off Peak 21–9 24.34 c/kWh Cost today: each period at its own rate week, month, per device: blended rate plus the supply charge for each day Only the live cost-per-hour gauges use the rate this minute. Totals never do.

Home Assistant adds the plugs and the model into one live house power figure in watts, and adds that up over time into kilowatt-hours (kWh). Utility meters (a Home Assistant helper that keeps a running total and resets it each day, week or month) keep the kWh in three buckets, one per tariff period. An automation switches the bucket at 9 am, 3 pm and 9 pm.

Our plan is Synergy’s Midday Saver. It has three periods, and they apply every day, weekends too:

Period Hours Rate
Super Off Peak 9 am to 3 pm 8.8520 c/kWh
Peak 3 pm to 9 pm 55.3253 c/kWh
Off Peak 9 pm to 9 am 24.3431 c/kWh
Supply charge per day 132.7806 c

Today’s cost prices each bucket at its own rate, then adds the day’s supply charge. This week, this month and per-device costs use a blended rate: what the house’s kWh really cost over that period, divided by how many kWh there were. Ours works out at about 28.7 to 28.8 c/kWh. The supply charge sits on its own line, because no device causes it.

The only thing that uses the rate this minute is the live cost per hour gauges: “if it kept drawing this, it would cost this much an hour”. That’s honest for a gauge. It’s not honest for a weekly total, and it took me a while to work that out (see the lessons).

What you need

  • Home Assistant with a working Zigbee setup.
  • Power-metering Zigbee smart plugs, one per big load. Each one needs to be rated for what it’s feeding: check the rating on the plug against the appliance’s nameplate. Mine are 16 A plugs.
  • Your tariff, from your retailer’s website. Not from your last bill (see the lessons).
  • The annual energy rating (the kWh per year on the energy label) for anything you’re going to model instead of measure.
  • Optional, for the gauges: the canvas-gauge-card custom card from HACS (the community add-on store).

What’s measured and what’s modelled

Measured, with a plug each:

Circuit Notes
Washer and dryer One plug each
Fridge and microwave Share a plug
Dishwasher
Lounge TV and media
Server and network gear Also the 3D printer. See the lessons: this one nearly got counted twice.
A hallway power board Feeds the beer fridge’s own plug, so it needs care. See the lessons.
Garage

That was 8 plugs to start. There are 14 now, as more turned up: one went in a bedroom, and the beer fridge got its own plug behind the hallway board’s.

Modelled, because they can’t carry a plug:

  • Lights. Matter and Thread smart bulbs don’t report power at all; I checked a live one and it only reports brightness and colour. Each bulb is modelled as off = 0.4 W, on = 0.4 W plus its share of 9 W by brightness. The 9 W is the bulb’s “power consumption” figure from the spec sheet, not the 7 W “light source” figure.
  • A bedroom fan. It’s an air purifier and fan in one, about 50 W flat out. A fan’s power goes up with the cube of its speed, so a third speed is nowhere near a third of the power: 33% is about 7.6 W, 66% about 18.6 W, 100% is 50 W.
  • The aircon, summer only. We don’t use it in winter, so it’s an estimate for December, January and February and zero the other nine months. I started with a guess of 6 kWh a day.

Deliberately left out: the bedrooms. They only run a couple of phone chargers, so I didn’t guess. One of them has a plug now. Gas hot water is left out too, because it isn’t on the electricity bill. If yours is electric or a heat pump, it has to go in or the model will badly undercount.

The Home Assistant config

The YAML below is rebuilt from my notes, not copied off the running system, and hasn’t been run as-is. Treat it as a starting point and check it in your own setup.

The examples use these names. Rename to suit, or rename your entities in Settings → Entities:

  • sensor.washer_power, sensor.dryer_power, sensor.fridge_power, sensor.server_rack_power: the plugs’ power in W
  • sensor.washer_energy, sensor.dryer_energy, sensor.fridge_energy, sensor.server_rack_energy: the plugs’ own kWh counters
  • fan.example_fan: the modelled fan

The numbers you’ll tune

Every rate and every modelled figure is a helper, not a number buried in a template. That way you can compare a month against a real bill and nudge the guesses without touching the templates.

# configuration.yaml
input_number:
  tou_peak_rate:
    name: Peak rate
    min: 0
    max: 200
    step: 0.0001
    mode: box
    unit_of_measurement: c/kWh
    initial: 55.3253
  tou_off_peak_rate:
    name: Off Peak rate
    min: 0
    max: 200
    step: 0.0001
    mode: box
    unit_of_measurement: c/kWh
    initial: 24.3431
  tou_super_off_peak_rate:
    name: Super Off Peak rate
    min: 0
    max: 200
    step: 0.0001
    mode: box
    unit_of_measurement: c/kWh
    initial: 8.8520
  tou_supply_charge:
    name: Supply charge
    min: 0
    max: 500
    step: 0.0001
    mode: box
    unit_of_measurement: c/day
    initial: 132.7806
  bulb_rated_w:
    name: Bulb rated power
    min: 0
    max: 20
    step: 0.1
    mode: box
    unit_of_measurement: W
    initial: 9
  bulb_standby_w:
    name: Bulb standby power
    min: 0
    max: 2
    step: 0.1
    mode: box
    unit_of_measurement: W
    initial: 0.4
  fan_base_w:
    name: Fan base power
    min: 0
    max: 20
    step: 0.1
    mode: box
    unit_of_measurement: W
    initial: 6
  fan_max_w:
    name: Fan max power
    min: 0
    max: 200
    step: 1
    mode: box
    unit_of_measurement: W
    initial: 50
  aircon_summer_kwh_day:
    name: Aircon summer use
    min: 0
    max: 30
    step: 0.1
    mode: box
    unit_of_measurement: kWh/day
    initial: 6

Because these have initial:, a restart puts them back to the YAML value. Change a price in the YAML, not on the dashboard, or it’ll quietly revert. (If you’d rather tune them on the dashboard, make them in the UI under Settings → Devices & services → Helpers instead, and leave the YAML out.)

The live watts

The lights model, the house total, and a cost per hour. The lights block skips light groups, because a group contains the same bulbs again.

# configuration.yaml
template:
  - sensor:
      - name: Lights power model
        unique_id: lights_power_model
        unit_of_measurement: W
        device_class: power
        state_class: measurement
        # Assumes every light is the same 9 W bulb. Light groups carry an
        # entity_id attribute (their members), so they're skipped.
        state: >
          {% set rated = states('input_number.bulb_rated_w') | float(9) %}
          {% set standby = states('input_number.bulb_standby_w') | float(0.4) %}
          {% set ns = namespace(w=0) %}
          {% for l in states.light | rejectattr('attributes.entity_id', 'defined') %}
            {% if l.state == 'on' %}
              {% set b = l.attributes.brightness | default(255, true) | float(255) %}
              {% set ns.w = ns.w + standby + b / 255 * (rated - standby) %}
            {% elif l.state == 'off' %}
              {% set ns.w = ns.w + standby %}
            {% endif %}
          {% endfor %}
          {{ ns.w | round(1) }}
        attributes:
          bulbs_on: >
            {{ states.light | rejectattr('attributes.entity_id', 'defined')
               | selectattr('state', 'eq', 'on') | list | count }}
          bulbs_total: >
            {{ states.light | rejectattr('attributes.entity_id', 'defined') | list | count }}

      - name: House power
        unique_id: house_power
        unit_of_measurement: W
        device_class: power
        state_class: measurement
        # ⚠ The plug list appears THREE times (here, measured_w, plugs_reporting).
        # When you add a plug, add it to all three.
        state: >
          {% set plugs = ['sensor.washer_power', 'sensor.dryer_power',
                          'sensor.fridge_power', 'sensor.server_rack_power'] %}
          {% set ns = namespace(w=0) %}
          {% for p in plugs %}{% set ns.w = ns.w + states(p) | float(0) %}{% endfor %}
          {% set lights = states('sensor.lights_power_model') | float(0) %}
          {% set base = states('input_number.fan_base_w') | float(6) %}
          {% set top = states('input_number.fan_max_w') | float(50) %}
          {% set frac = state_attr('fan.example_fan', 'percentage') | float(0) / 100 %}
          {% set fan = base + (top - base) * frac ** 3 if is_state('fan.example_fan', 'on') else 0 %}
          {% set aircon = states('input_number.aircon_summer_kwh_day') | float(0) * 1000 / 24
                          if now().month in [12, 1, 2] else 0 %}
          {{ (ns.w + lights + fan + aircon) | round(1) }}
        attributes:
          measured_w: >
            {% set plugs = ['sensor.washer_power', 'sensor.dryer_power',
                            'sensor.fridge_power', 'sensor.server_rack_power'] %}
            {% set ns = namespace(w=0) %}
            {% for p in plugs %}{% set ns.w = ns.w + states(p) | float(0) %}{% endfor %}
            {{ ns.w | round(1) }}
          plugs_reporting: >
            {% set plugs = ['sensor.washer_power', 'sensor.dryer_power',
                            'sensor.fridge_power', 'sensor.server_rack_power'] %}
            {{ plugs | select('has_value') | list | count }} of {{ plugs | count }}

      - name: House cost per hour
        unique_id: house_cost_per_hour
        unit_of_measurement: AUD/h
        # W / 1000 x c/kWh / 100 = dollars an hour. A RATE, not a total,
        # and no supply charge in it.
        state: >
          {{ (states('sensor.house_power') | float(0) / 1000
              * states('sensor.tou_rate') | float(0) / 100) | round(3) }}

      - name: Washer cost per hour
        unique_id: washer_cost_per_hour
        unit_of_measurement: AUD/h
        availability: "{{ has_value('sensor.washer_power') }}"
        state: >
          {{ (states('sensor.washer_power') | float(0) / 1000
              * states('sensor.tou_rate') | float(0) / 100) | round(3) }}

Copy the washer one for each plug.

The tariff period and rate

# configuration.yaml, in the same template: list
  - sensor:
      - name: TOU period
        unique_id: tou_period
        state: >
          {% set h = now().hour %}
          {% if 9 <= h < 15 %}Super Off Peak
          {% elif 15 <= h < 21 %}Peak
          {% else %}Off Peak{% endif %}

      - name: TOU rate
        unique_id: tou_rate
        unit_of_measurement: c/kWh
        state: >
          {% set p = states('sensor.tou_period') %}
          {% if p == 'Peak' %}{{ states('input_number.tou_peak_rate') | float(0) }}
          {% elif p == 'Super Off Peak' %}{{ states('input_number.tou_super_off_peak_rate') | float(0) }}
          {% else %}{{ states('input_number.tou_off_peak_rate') | float(0) }}{% endif %}

      # The same rate in dollars, for Home Assistant's built-in Energy panel.
      - name: TOU rate dollars
        unique_id: tou_rate_dollars
        unit_of_measurement: AUD/kWh
        state: "{{ (states('sensor.tou_rate') | float(0) / 100) | round(6) }}"

Watts into kWh, split by period

The Riemann sum integration turns watts into kWh. Two settings matter. method: left, because the house figure moves in steps and the default trapezoidal method would smooth between them and overstate. And max_sub_interval, because without it a long steady stretch adds nothing until the figure next changes.

# configuration.yaml
sensor:
  - platform: integration
    source: sensor.house_power
    name: House energy
    unique_id: house_energy
    unit_prefix: k
    unit_time: h
    method: left
    round: 3
    max_sub_interval:
      minutes: 5

utility_meter:
  house_energy_daily:
    source: sensor.house_energy
    cycle: daily
    tariffs: [peak, off_peak, super_off_peak]
  house_energy_weekly:
    source: sensor.house_energy
    cycle: weekly
    tariffs: [peak, off_peak, super_off_peak]
  # One per plug. Use the plug's own kWh counter, not the house figure.
  washer_energy_weekly:
    source: sensor.washer_energy
    cycle: weekly
  dryer_energy_weekly:
    source: sensor.dryer_energy
    cycle: weekly
  fridge_energy_weekly:
    source: sensor.fridge_energy
    cycle: weekly
  server_rack_energy_weekly:
    source: sensor.server_rack_energy
    cycle: weekly

The integration sensor comes out with state_class: total, not total_increasing. That’s correct for it, and the Energy panel accepts it. Don’t “fix” it. Monthly and quarterly meters are the same again with cycle: monthly and cycle: quarterly. New top-level utility_meter entries need a full restart, not a reload.

Each meter with tariffs: makes one sensor per tariff (sensor.house_energy_daily_peak and so on) and a dropdown, select.house_energy_daily, that says which one is counting. This automation flips them. The start-up trigger matters: after a restart mid-afternoon, the meters need to land on Peak, not wait for 9 pm.

# automations.yaml
- id: tou_period_switch
  alias: "Energy: switch tariff period"
  mode: single
  triggers:
    - trigger: time
      at: ["09:00:00", "15:00:00", "21:00:00"]
    - trigger: homeassistant
      event: start
  actions:
    - variables:
        tariff: >
          {% set h = now().hour %}
          {{ 'super_off_peak' if 9 <= h < 15 else 'peak' if 15 <= h < 21 else 'off_peak' }}
    - action: select.select_option
      target:
        entity_id:
          - select.house_energy_daily
          - select.house_energy_weekly
      data:
        option: "{{ tariff }}"

The period sensors read unknown until some energy has gone through them. On day one that’s normal.

What it costs

Today: each period at its own rate, plus one day’s supply charge.

# configuration.yaml, in the same template: list
  - sensor:
      - name: House cost today
        unique_id: house_cost_today
        unit_of_measurement: AUD
        device_class: monetary
        state: >
          {% set p = states('sensor.house_energy_daily_peak') | float(0) %}
          {% set o = states('sensor.house_energy_daily_off_peak') | float(0) %}
          {% set s = states('sensor.house_energy_daily_super_off_peak') | float(0) %}
          {% set cents = p * states('input_number.tou_peak_rate') | float(0)
                       + o * states('input_number.tou_off_peak_rate') | float(0)
                       + s * states('input_number.tou_super_off_peak_rate') | float(0)
                       + states('input_number.tou_supply_charge') | float(0) %}
          {{ (cents / 100) | round(2) }}

      - name: House cost week
        unique_id: house_cost_week
        unit_of_measurement: AUD
        device_class: monetary
        # Weekly meters reset at 00:00 Monday, so "this week" is Monday to now.
        state: >
          {% set p = states('sensor.house_energy_weekly_peak') | float(0) %}
          {% set o = states('sensor.house_energy_weekly_off_peak') | float(0) %}
          {% set s = states('sensor.house_energy_weekly_super_off_peak') | float(0) %}
          {% set energy_c = p * states('input_number.tou_peak_rate') | float(0)
                          + o * states('input_number.tou_off_peak_rate') | float(0)
                          + s * states('input_number.tou_super_off_peak_rate') | float(0) %}
          {% set days = now().weekday() + 1 %}
          {{ ((energy_c + days * states('input_number.tou_supply_charge') | float(0)) / 100) | round(2) }}
        attributes:
          blended_c_per_kwh: >
            {% set p = states('sensor.house_energy_weekly_peak') | float(0) %}
            {% set o = states('sensor.house_energy_weekly_off_peak') | float(0) %}
            {% set s = states('sensor.house_energy_weekly_super_off_peak') | float(0) %}
            {% set kwh = p + o + s %}
            {% set energy_c = p * states('input_number.tou_peak_rate') | float(0)
                            + o * states('input_number.tou_off_peak_rate') | float(0)
                            + s * states('input_number.tou_super_off_peak_rate') | float(0) %}
            {{ (energy_c / kwh) | round(2) if kwh > 0 else 0 }}
          supply_days: "{{ now().weekday() + 1 }}"
          prev_blended_c_per_kwh: >
            {% set p = state_attr('sensor.house_energy_weekly_peak', 'last_period') | float(0) %}
            {% set o = state_attr('sensor.house_energy_weekly_off_peak', 'last_period') | float(0) %}
            {% set s = state_attr('sensor.house_energy_weekly_super_off_peak', 'last_period') | float(0) %}
            {% set kwh = p + o + s %}
            {% set energy_c = p * states('input_number.tou_peak_rate') | float(0)
                            + o * states('input_number.tou_off_peak_rate') | float(0)
                            + s * states('input_number.tou_super_off_peak_rate') | float(0) %}
            {{ (energy_c / kwh) | round(2) if kwh > 0 else 0 }}

The month and quarter sensors are the same shape, with the supply charge times the days so far.

The per-device tables

Each device’s kWh comes from its own plug. Its cost is that kWh times the house’s blended rate for the same period, which is why the table says “approx.”: a fridge running round the clock has a different mix of periods to a dryer that only runs at midday. The supply charge gets its own row.

This one is this week, biggest first:

type: markdown
title: This week (approx.)
content: |
  {%- set rate = state_attr('sensor.house_cost_week', 'blended_c_per_kwh') | float(0) -%}
  {%- set days = state_attr('sensor.house_cost_week', 'supply_days') | float(0) -%}
  {%- set supply = states('input_number.tou_supply_charge') | float(0) -%}
  {%- set meters = [
      ('Washer', 'sensor.washer_energy_weekly'),
      ('Dryer', 'sensor.dryer_energy_weekly'),
      ('Fridge', 'sensor.fridge_energy_weekly'),
      ('Server and network', 'sensor.server_rack_energy_weekly'),
  ] -%}
  {%- set ns = namespace(rows=[]) -%}
  {%- for name, e in meters -%}
    {%- set ns.rows = ns.rows + [{'name': name, 'kwh': states(e) | float(0)}] -%}
  {%- endfor -%}
  | Device | kWh | Cost |
  |---|---:|---:|
  {%- for r in ns.rows | sort(attribute='kwh', reverse=true) %}
  | {{ r.name }} | {{ '%.2f' | format(r.kwh) }} | ${{ '%.2f' | format(r.kwh * rate / 100) }} |
  {%- endfor %}
  | Supply charge | | ${{ '%.2f' | format(days * supply / 100) }} |

  Blended rate {{ rate }} c/kWh

For last week, copy it and change three things: read each meter’s last_period attribute with state_attr(e, 'last_period') instead of states(e), use prev_blended_c_per_kwh for the rate, and make days a fixed 7. Put the two cards side by side and you have this week against last week.

The Biggest users today card at the top of the Power page works the same way, but for today: each plug also has a daily meter (cycle: daily), and the card draws them as bars, biggest first.

A newer version of the Power page is being tried out as I write this.

The built-in Energy panel

Home Assistant’s own Energy panel keeps its settings separately from your dashboards, so it needs telling as well. In Settings → Dashboards → Energy:

  • Under Grid consumption, add sensor.house_energy, and for the price choose Use an entity with current price and pick sensor.tou_rate_dollars. Not a fixed price.
  • Under Individual devices, add each plug’s own kWh sensor. If one plug feeds another (like our hallway board and the beer fridge), set the downstream one’s upstream device to the upstream plug so it isn’t counted twice.

The gauges

The Power page is one big dial for the house, one for cost per hour, then a dial per circuit, three across. Two layout settings did most of the work. In a sections view, set max_columns: 1 (oddly, that gives the widest layout) and size each card with grid_options.columns out of 12: 6 for half width, 4 for a third. Leave grid_options out and every card comes out narrow.

type: custom:canvas-gauge-card
entity: sensor.dryer_power
card_height: 313
grid_options:
  columns: 4
gauge:
  type: radial-gauge
  width: 283      # required, along with height
  height: 283
  minValue: 0
  maxValue: 2500
  highlights:
    - { from: 0, to: 1750, color: "green" }
    - { from: 1750, to: 2250, color: "orange" }
    - { from: 2250, to: 2500, color: "red" }

The card’s settings live under gauge:. Keep width and height in there: without them you get a small dial floating in a big empty card. Set card_height about 30 more than the dial.

Scale each dial to what that circuit really draws, or the needle on a 73 W circuit never moves on a 3840 W dial. I pulled the maximum for each plug out of 11 days of recorded history:

Circuit Highest seen Dial goes to
Dryer 2245 W 2500 W
Washer 1353 W 2000 W
Fridge and microwave 2233 W 2500 W
Dishwasher 2155 W 2500 W
Beer fridge (before the split) 523 W 600 W
Lounge TV 178 W 250 W
Server and network gear 73 W 150 W
Garage 181 W 250 W
Lights (14 bulbs × 9 W) 150 W

The colour bands are 70% green, 70 to 90% amber and the top 10% red on every dial, so they mean the same thing everywhere. The fridge and dishwasher idle around 51 W and 104 W but spike to about 2200 W, so I left them on the full 2500 W. The needle stays honest and never pegs.

Step by step

  1. Get your rates from your retailer’s website, and set up the rate helpers.
  2. Add the tariff period and rate sensors. Check in Developer tools → States that the period is right for the time of day.
  3. Plug in and pair the smart plugs on your biggest loads. Give them a few days.
  4. Write down what’s left over, and model only that. Use the annual kWh rating for appliances, and the bulbs’ standby draw.
  5. Add the house power sensor, the integration, the utility meters and the tariff automation. Restart.
  6. Add the cost sensors and the cost-per-hour sensors.
  7. Point the built-in Energy panel at the live price, and add the plugs as individual devices.
  8. Build the gauges and tables. Size the dials from your own history.
  9. After a month, compare the model against a real bill and adjust the modelled figures.

Testing it

  • Don’t switch any plug off to test anything. One of ours powers the server and the network. Watch real use instead.
  • Check the lights model by hand. With 14 bulbs and 6 on at full brightness, it should be 6 × 9 W + 8 × 0.4 W = 57.2 W. Ours read 57.2 W. Do the sum yourself; don’t trust the template.
  • Check plugs_reporting on the house power sensor reads “8 of 8” (or however many you have). After a restart the plugs read unknown for a minute or two, because they only report when something changes. That’s not a fault.
  • Check the dropdown select.house_energy_daily after a restart. It should match the period you’re in.
  • Check each plug’s kWh day by day against the plug’s own statistics. Mine matched. When the costs looked wrong, it was the pricing, not the kWh.
  • Compare a month against a real bill. That’s the real test of the model.

Lessons learnt

Pricing a week at the rate this minute gave three different answers. My first tables multiplied every kWh by the rate right now. The same week came out at about $8 if you looked at noon, and about $51 at 6 pm. The real figure was about $27. A rate this minute is fine on a live gauge. For any total, use a blended rate built from the period buckets.

Use the annual kWh rating, never the nameplate watts. Our fridge says 790 W on the nameplate, which is the compressor. Its energy label says 258 kWh a year: 0.71 kWh a day, about 29.5 W on average. Using 790 W would have overstated it about 25 times and swamped the whole model. My first guess of 1.4 kWh a day was nearly double the real figure too. And labels are measured on the eco cycle: we run the dishwasher on a heavier cycle daily, so I modelled it at 1.6 times its eco rating. The 1.6 is the guess, not the rating.

A smart bulb that’s “off” isn’t 0 W. The bulbs stay on the Thread mesh (the low-power radio network they talk on) when they’re off, so each draws about 0.4 W all day. With 13 bulbs that was a 5.2 W floor, around $12 a year, that an “off means zero” model misses for good.

Don’t count the same watts twice. It happened three ways here. The server measured its own power, and the old model added that on top of the house total; but the server sits on one of the plugs, so it would have been counted twice. Light groups contain the same bulbs as the individual lights, so summing groups double-counts. And when I gave the beer fridge its own plug, it was downstream of the hallway board’s plug, so the fridge plug must never go into the house total, and the hallway dial shows the board minus the fridge.

Adding a plug touches more places than you think. Utility meters, the three plug lists in the house total, the gauges, every table and graph on the Power page, and the built-in Energy panel’s settings, which live somewhere else entirely. A comment in my template still said “the 8 plugs” when there were 12. Count them; don’t trust the comment. And when you save Energy panel settings through the API, read them back: a save with one wrong key came back as a failure with no error at all.

A price with initial: comes back on every restart. The supply charge helper had an old value in its initial:. I’d change it, and the next restart would quietly put the old one back. If a helper has initial:, the YAML is where its value lives.

The bill was 10% cheaper than the website. Every line on our last bill was exactly 10% lower than the retailer’s current rates, because of a scheduled price rise. Use the current rates from the website, and keep them in helpers so the next rise is a quick edit.

The built-in Energy panel was still on the old flat rate. I’d fixed my own dashboards, but the Energy panel had its own fixed price of 31.6 c/kWh. It showed 4.9 kWh as $1.56 when nearly all of it was Super Off Peak at 8.852 c. Pointing it at the live price fixed it from then on. It doesn’t reprice history, so that day stayed wrong.

The house kWh undercounts when Home Assistant is down. The integration only adds up what Home Assistant sees. When it was off for a move to new hardware, the house figure for the month came out at 322 kWh against 364 kWh from adding up the plugs, because the plugs keep counting on their own. So “Cost this month” read $128.50 while the table of plugs added up to $140.48. I haven’t fixed that yet.

Label things for what they are. One table said “rolling 7 days”. It wasn’t: weekly utility meters reset at midnight on Monday. Small, but it made every weekly number look wrong until I spotted it.

Questions and comments

Loading comments…

    Your name and comment show publicly. To stop spam, a scrambled code made from your internet address is kept, never the address itself. Comments with links wait for a quick check before they show. Be decent: I'll remove anything that isn't.