Real AI agent use cases, with sources and setup prompts
How to lower your electric bill with Home Assistant and AI: energy dashboard, smart plugs, time-of-use automations
Short answer: Install Home Assistant (free; Home Assistant Green is $199 ready-made) and open Settings > Dashboards > Energy. Feed it whole-home data: many US utilities (PG&E, ConEd, ComEd, PSE, Eversource and more) work through the built-in Opower integration with a 48-hour delay, or install an Emporia Vue 3 ($99.99 whole-home, up to $199.99 with 16 circuit sensors) for live per-circuit data. Add Shelly Plug US Gen4 smart plugs ($24.99) on suspect devices like a space heater, dehumidifier, gaming PC or second fridge. After a week, export the data and ask an AI to rank the biggest loads, estimate always-on standby use, and compare your utility's time-of-use plan against your hourly usage. Then let it write Home Assistant automations (utility_meter tariffs, run-when-cheap, standby cut-off) that you review before saving. An AI never needs control of your panel or thermostat to find the savings.
Related real builds: a Grok Bot that shifts two EVs' charging to cheap hours using Tibber, a bot that matches Tesla charging to off-grid solar, a landlord's AI that reads boiler error codes from a camera, and Home Assistant setups that Claude and Grok Bot wired up overnight. 8 matching use cases below, each with a public source.
Free, open-source smart home hub with a built-in Energy dashboard for grid use, solar, batteries, gas, water and individual devices. Current release 2026.10.
Pulls your utility's own usage and cost data (hourly for the past 2 months, daily for 3 years where the utility provides it) into the Energy dashboard. Works with PG&E, ConEd, ComEd, PECO, BGE, Pepco, PSE, Eversource, AEP and others. Data arrives about 48 hours late.
Smart plug that measures voltage, current, power and energy, works locally with Home Assistant's built-in Shelly integration (no cloud account needed). Rated 15 A / 1800 W.
Panel monitor with clamps on your mains and up to 16 circuits (dryer, AC, water heater, EV). Stock it's cloud-only via a community HACS integration; the unofficial emporia-vue-local project reflashes it with ESPHome for fully local data.
$99.99 whole-home; $149-$199.99 with 8-16 circuit sensors
Analyzes your exported usage CSV, compares rate plans, and writes the YAML. Claude Code can also SSH into the Home Assistant host; Home Assistant's MCP Server integration lets an assistant read entities directly.
Free chat tiers work; Claude Pro or ChatGPT Plus $20/mo
Prices are from each official page, checked Oct 28, 2026; they exclude tax and can change. Swipe the table sideways on a phone.
Get whole-home data into the Energy dashboard
About 20 minutes if your utility uses Opower; an afternoon (and an electrician, if you're not comfortable in a panel) for an Emporia Vue.
Install Home Assistant. Use Home Assistant Green, or install Home Assistant OS on a Raspberry Pi 4/5, mini PC or VM following the official installation page. Open http://homeassistant.local:8123 and create your account.
Option A: your utility's data through Opower. Go to Settings > Devices & services > Add integration > Opower, pick your utility and log in. ConEd needs your TOTP secret (the ~16-character setup key, not a 6-digit code); PG&E and Exelon utilities (ComEd, PECO, BGE, Pepco, ACE, Delmarva) send an MFA code. Then go to Settings > Dashboards > Energy, choose Add grid connection, select the 'Opower ... elec ... consumption' statistic, and pick 'Use an entity tracking the total costs' with the matching cost statistic. Expect no data for today and maybe yesterday: utilities publish with about a 48-hour delay. Some utilities give hourly kWh but only monthly cost, so daily cost shows 0; that's normal per the integration docs.
Option B: live data with a panel monitor. Have an Emporia Vue 3 installed in your panel (mains clamps plus circuit clamps on the big loads). Add it with the community Emporia Vue integration from HACS, or follow emporia-vue-local's ESPHome guide for fully local readings. Panel work is dangerous; Emporia-vue-local's own docs say it should be done by a qualified person.
Convert watts to kWh if needed. The Energy dashboard needs kWh sensors. If a device only reports watts, add an Integral (Riemann sum) helper, or this YAML:
yaml
# configuration.yaml: turn a watts-only sensor into kWh for the Energy dashboard
# (same thing as Settings > Devices & services > Helpers > Create helper > Integral sensor)
sensor:
- platform: integration
source: sensor.space_heater_power # a sensor in W
name: space_heater_energy
unit_prefix: k # W -> kWh
round: 2
max_sub_interval:
minutes: 5
Find the waste with smart plugs and an AI
One to two weeks of measuring, then 15 minutes with an AI chat.
Plug in Shelly plugs on suspects. Good suspects: space heaters, dehumidifiers, a second fridge or chest freezer, gaming PC, TV and console corner, aquarium, crypto miner, old window AC. Home Assistant discovers Shelly devices on your Wi-Fi automatically (Settings > Devices & services). Add each plug's energy sensor under Settings > Dashboards > Energy > Individual devices.
Export a week of data. Use the Energy dashboard's download option, or pull history over Home Assistant's REST API:
shell
# Run from any computer on your home network (or have Claude Code run it):
# export the last 7 days of a sensor's history as CSV for an AI to analyze
curl -s -H "Authorization: Bearer $HA_TOKEN" \
"http://homeassistant.local:8123/api/history/period/2026-10-21T00:00:00?end_time=2026-10-28T00:00:00&filter_entity_id=sensor.home_power&minimal_response" \
| python3 -c 'import sys,json,csv; w=csv.writer(sys.stdout); [w.writerow([r["last_changed"],r["state"]]) for r in json.load(sys.stdin)[0]]' \
> home_power_week.csv
# HA_TOKEN = a long-lived access token from your HA profile > Security.
# Treat it like a password and delete it when you're done.
Ask the AI. Paste the CSV and your rate (from the bill, including delivery charges) into ChatGPT or Claude with the 'Rank my biggest energy costs' prompt below. Ask for dollar amounts per month, not just kWh.
Automate time-of-use savings and standby cut-offs
For people on a time-of-use or dynamic-price plan, or with obvious standby waste.
Track peak vs off-peak usage. From Home Assistant's utility_meter docs: this creates select entities you flip at your plan's peak times, so you can see exactly how many kWh land in expensive hours.
yaml
# configuration.yaml: split usage into peak and off-peak buckets
utility_meter:
daily_energy:
source: sensor.home_energy # your whole-home kWh sensor
name: Daily Energy
cycle: daily
tariffs:
- peak
- offpeak
monthly_energy:
source: sensor.home_energy
name: Monthly Energy
cycle: monthly
tariffs:
- peak
- offpeak
# automations.yaml: switch tariff at your plan's times (example: peak 4-9 PM)
- alias: "Switch energy tariff"
triggers:
- trigger: time
at: "16:00:00"
variables:
tariff: "peak"
- trigger: time
at: "21:00:00"
variables:
tariff: "offpeak"
actions:
- action: select.select_option
target:
entity_id:
- select.daily_energy
- select.monthly_energy
data:
option: "{{ tariff }}"
Add safe cut-offs and reminders. Have the AI tailor these to your entity names, then paste into Settings > Automations > Create > Edit in YAML. Check the entity IDs in Settings > Entities first.
yaml
# automations.yaml: cut a TV/console/PC corner's standby power late at night
# (only for plugs feeding things that are safe to switch off)
- alias: "Kill entertainment standby at 1 AM"
triggers:
- trigger: time
at: "01:00:00"
conditions:
- condition: numeric_state
entity_id: sensor.tv_corner_power
below: 15 # watts: only if everything is idle
actions:
- action: switch.turn_off
target:
entity_id: switch.tv_corner
- alias: "Space heater left on: warn after 2 hours"
triggers:
- trigger: numeric_state
entity_id: sensor.space_heater_power
above: 500
for:
hours: 2
actions:
- action: notify.mobile_app_your_phone
data:
message: "Space heater has drawn {{ states('sensor.space_heater_power') }} W for 2 hours."
Run each automation manually once (three-dot menu > Run actions) to make sure it does what you expect.
Copy-paste prompts
Written for this setup. Replace anything in [brackets] before you send it.
1. Rank my biggest energy costs
After a week of data.
Here is a CSV of my home's power readings for one week (timestamp, watts) plus per-device energy from smart plugs: [paste]. My electricity costs [$ per kWh, including delivery] on a [flat / time-of-use: peak hours and prices] plan. 1) Rank the top 10 loads by monthly dollar cost. 2) Estimate my always-on baseline in watts and what it costs per year. 3) List the 5 changes with the best savings per hour of effort, with the dollar estimate and your assumptions for each. Don't suggest anything that needs an electrician unless you flag it.
2. Should I switch to a time-of-use plan?
Your utility offers a TOU or EV plan.
I'm on [current plan and price]. My utility also offers [paste TOU plan: peak/off-peak hours, prices, fixed charges, seasons]. Here's my hourly usage for the last [N] days from my utility or Home Assistant: [paste CSV]. Calculate what I'd have paid on each plan, then again if I moved [dishwasher, laundry, EV charging, water heater] to off-peak. Show the math in a table and tell me the break-even point. Flag anything the plan's fine print might change (seasonal rates, demand charges).
3. Write my Home Assistant automations
You've picked what to automate.
Write Home Assistant automations in current YAML syntax (triggers:/actions:, action: not service:) for: [e.g. turn off switch.tv_corner at 1 AM if sensor.tv_corner_power is below 15 W; notify my phone if sensor.space_heater_power is above 500 W for 2 hours; switch my utility_meter tariff select at 4 PM and 9 PM on weekdays]. My entity IDs are: [paste from Settings > Entities]. Never switch off fridges, freezers, heating, medical devices or network gear. Explain each automation in one sentence and how to test it.
4. Find my standby vampires
Your overnight baseline looks high.
My house never drops below [X] W overnight, even with everything 'off'. Here's a list of what's plugged in, by room: [list]. Here are per-device readings I have: [paste]. Estimate which items are likely drawing standby power, typical standby watts for each, and the annual cost at [$ per kWh]. Then give me a 30-minute test plan with a smart plug (what to measure, in what order) to confirm the biggest ones.
5. Pick an energy monitor for my house
Before buying hardware.
Help me choose how to measure energy at home. My setup: [country, panel type and amps if known, solar yes/no, EV yes/no, heat pump/AC/electric water heater], my utility [name], comfort with electrical work [none/some], and I want data to stay [local / cloud is fine]. Compare: my utility's data through Home Assistant's Opower integration (if supported), an Emporia Vue 3 (stock vs ESPHome-flashed), and smart plugs only. Give costs, setup effort, what each can't see, and your recommendation.
6. Shift my EV or big loads to cheap hours
You have an EV, heat pump or dynamic prices.
I have [EV model / heat pump / pool pump], my price comes from [Tibber / Nord Pool / fixed TOU schedule: details], and Home Assistant entities: [paste]. Design a Home Assistant automation that runs [load] during the cheapest [N] hours before [deadline, e.g. 7 AM], with a manual override, a minimum charge/comfort level, and a notification of what it decided. Keep it simple and explain any helper entities I need to create first.
7. Explain my bill line by line
Your bill is confusing.
Here is my electric bill (text or photo): [paste]. Explain every line item, which ones depend on kWh used and which are fixed, my true all-in price per kWh, and which charges I can actually lower by using less or shifting usage. If there are riders or fees I could ask the utility about, list the exact question to ask.
Safety checklist
Don't open your electrical panel unless you're qualified. Panel monitors like the Emporia Vue 3 install inside a live panel; hire an electrician if unsure.
Never put a smart plug on a load above its rating (Shelly Plug US Gen4: 15 A / 1800 W). Many space heaters draw 1500 W, so use plugs rated for it and never through a power strip.
Keep fridges, freezers, sump pumps, medical equipment, heating in freezing weather and network gear out of any automation that can switch them off.
A Home Assistant long-lived access token or utility login gives full access. Don't paste tokens or passwords into an AI chat; give an agent a separate, limited Home Assistant user where possible.
Review every AI-written automation before saving it, and run it once manually. Wrong entity IDs are the most common failure.
devinstubbs connected Grok Bot to the Tibber and Tesla APIs so it watches live house power use and controls charging on both cars, staying under grid fee limits and shifting charging to cheaper hours.
A landlord pointed a Tapo camera at a rental's boiler, exports still frames and uses AI to read error codes on the screen, because the thermostats only alert once rooms are already cooling.
A designer vibe coded Hearth over a weekend with help from Claude and Codex, using SwiftUI, Python and JavaScript. It sits in the Mac menu bar and connects to hundreds of Home Assistant integrations: energy use, cameras, speakers, lights, plugs, air conditioners and supported cars.
Model_Culture checked into a smart-home Airbnb (about EUR 120 a night) and says Claude Code found a hidden microphone in a smart plug and an unsecured doorbell camera broadcasting to the open internet, all in under two minutes.
Mellon0x thought he had 9 devices on his home Wi-Fi: phone, laptop, TV and a few smart plugs. He asked Grok Bot to help audit the network and the count came back as 11, including a smart plug he had completely forgotten.
He owns 9 devices, so he asked Claude Code to list everything connected to his router. It found 11: one was an old forgotten smart plug and the other was a device he did not recognize. He shared a read-only audit prompt that does not change router settings.
Film photographer built a phone-driven f-stop timer that switches a cheap smart plug for darkroom printing.
See pricing page1 weekendIntermediate
Common questions
How do you lower your electric bill with Home Assistant and AI: energy dashboard, smart plugs, time-of-use automations?
Install Home Assistant (free; Home Assistant Green is $199 ready-made) and open Settings > Dashboards > Energy. Feed it whole-home data: many US utilities (PG&E, ConEd, ComEd, PSE, Eversource and more) work through the built-in Opower integration with a 48-hour delay, or install an Emporia Vue 3 ($99.99 whole-home, up to $199.99 with 16 circuit sensors) for live per-circuit data. Add Shelly Plug US Gen4 smart plugs ($24.99) on suspect devices like a space heater, dehumidifier, gaming PC or second fridge. After a week, export the data and ask an AI to rank the biggest loads, estimate always-on standby use, and compare your utility's time-of-use plan against your hourly usage. Then let it write Home Assistant automations (utility_meter tariffs, run-when-cheap, standby cut-off) that you review before saving. An AI never needs control of your panel or thermostat to find the savings.
Can Home Assistant really lower my electric bill?
Home Assistant doesn't save energy by itself; it shows where it goes. The savings come from what you change: cutting standby loads, catching devices left running, and moving flexible loads to cheaper hours on a time-of-use plan. The Energy dashboard and smart plugs make those changes measurable.
Do I need to install anything in my electrical panel?
No. If your utility works with the Opower integration you get whole-home hourly data with nothing installed (about 48 hours delayed). Smart plugs cover anything that plugs in. A panel monitor is only needed for live whole-home or per-circuit data on hardwired loads.
Which utilities work with the Opower integration?
Home Assistant's docs list PG&E, ConEd and Orange & Rockland, Exelon utilities (ComEd, PECO, BGE, Pepco, Atlantic City Electric, Delmarva), AEP companies, Duquesne Light, Evergy, Eversource, NIPSCO, PSE, Rhode Island Energy, SMUD, Seattle City Light, SMECO, Burbank and Glendale Water and Power, City of Austin, Clark Public Utilities, AES Indiana and Southwest Gas.
Is it safe to let an AI agent control my smart home?
Let AI analyze data and write automations you review. If you connect an agent through Home Assistant's MCP Server integration, expose only the entities it needs and keep critical devices (heating, freezers, locks) out of its reach. See the guide on connecting an AI agent to Home Assistant.
How accurate are smart plug energy readings?
Good enough to rank devices and estimate costs. For billing-grade numbers, compare against your utility meter or Opower data over the same week.
What's the fastest saving to look for?
Your overnight baseline. Find the lowest watts your home draws at 3 AM; every 100 W of always-on load is about 876 kWh a year, which is roughly $150-$300 a year at $0.17-$0.35 per kWh.
Which AI tools do people use to lower your electric bill with Home Assistant and AI: energy dashboard, smart plugs, time-of-use automations?
Across the 8 sourced use cases in this guide, the most used tools are Grok Bot, Claude Code, Claude, Figma, Home Assistant.
How much does it cost to get started?
1 of the 8 use cases can start on a free plan. The most common paid starting price is $30/mo (1 use cases). Prices come from each tool's official pricing page.
How long does setup take?
0 of the 8 use cases list a setup time of an hour or less. Each card shows the setup time the builder reported.
Are these real examples?
Yes. Every use case links to its public source (an X post, a Hacker News thread or a GitHub repo) with the author and date, so you can check it yourself.
The Daily 5
Liked this guide? Get five new use cases tomorrow morning
Five new real AI use cases every morning. Free. Unsubscribe any time.