Beating the Grid: How I Automated My Home to Outsmart Surge Pricing
Beating the Grid: How I Automated My Home to Outsmart Surge Pricing
Electricity is one of those invisible expenses you don’t think much about until your summer AC bill arrives and ruins your day. But what if you could treat electricity like the stock market—buying it only when it’s dirt cheap, and letting your house “coast” when prices skyrocket?
That’s the promise of real-time hourly pricing. Here in Illinois, ComEd offers an Hourly Pricing program where you pay the actual wholesale market rate for electricity instead of a fixed flat rate. The statistics are incredibly compelling: in 2023, a staggering 99.3% of participants in ComEd’s program saved money, averaging $313 in annual savings (a 44% reduction in supply costs).
Right now, the standard fixed rate (Price to Compare) for residential ComEd customers is set at 9.66¢ per kWh. That’s what most people pay around the clock, day or night. But on the hourly pricing program, the price often plummets down to 2¢, 1¢, or even into negative numbers overnight when demand is low.
But there is a catch. The absolute cheapest electricity happens when you are asleep (often between 1 AM and 5 AM). The most expensive electricity hits right when you want it most: dinner time on a hot summer afternoon.
Manually chasing these prices by adjusting your thermostat or running out to unplug your car gets exhausting fast. So, I decided to put the “smart” back in my smart home. Using Home Assistant as the central nervous system, I built an automated, predictive energy-saving matrix that runs my house for pennies on the dollar.
Here is how I did it.
1. The Predictive Thermostat (Ecobee Integration)
HVAC is typically the biggest energy hog in any home. Standard smart thermostats are great at following a schedule, but they are completely blind to the cost of the electricity they are consuming.
I wrote a custom integration that constantly monitors ComEd’s hourly pricing, including the day-ahead forecast. Instead of just reacting to the temperature, my house now treats its own walls and airflow as a “thermal battery.”
Here is my HVAC playbook:
- Banking the Cheap Energy (Pre-Cooling): If electricity is currently dirt cheap (under 3¢/kWh) and my script sees a price spike coming in the next 4 hours, the system overrides my Ecobee. It lowers the setpoint by 3 degrees, aggressively cooling the house while power is basically free—a massive discount compared to the 9.66¢ fixed rate!
- Coasting Through the Spike (Conserve Mode): When the anticipated price spike hits (say, 6¢ to 10¢/kWh), the house enters “Conserve” mode. The thermostat jumps up a couple of degrees. Because I already pre-cooled the house, I stay perfectly comfortable for hours while the AC compressor stays off.
- Grid Emergency (Eco Mode): If the grid goes absolutely crazy and prices shoot above my “expensive” threshold, the house abandons ship and drops into “Away” mode to protect my wallet until the grid stabilizes.
By anticipating the market rather than just reacting to it, I stay comfortable during peak hours without paying peak prices.
2. The Self-Aware EV (Tesla Model Y)
Electric vehicles are amazing, but plugging an EV in when the grid is stressed can easily double or triple the cost of your “fill-up.”
The general advice is “just schedule your car to charge at midnight.” But what if midnight isn’t the cheapest hour? Sometimes prices drop below 2¢/kWh at 10 PM. Sometimes prices go negative (yes, the grid actually pays you to take power) at 3 AM.
I connected my Home Assistant directly to the Tesla Fleet API to create a dynamic, price-aware charging logic.
- Every 10 minutes, my automation checks the live ComEd hourly rate.
- I set a hard ceiling: my Tesla is only allowed to charge if the price is 2.0¢/kWh or less. Think about that—I am paying effectively one-fifth of the standard 9.66¢ fixed rate to fuel my car!
- If I plug the car in at 6 PM (when prices are usually high), it sits idle.
- The literal minute the ComEd hourly average drops to 2.0¢, Home Assistant wakes the car up and opens the floodgates.
- If an unexpected wind-drop causes overnight prices to surge back to 4¢/kWh, the car instantly pauses charging to wait it out.
I no longer guess when to charge. The car essentially day-trades electricity while I sleep, ensuring that every electron pumped into the battery is acquired at the absolute floor of the market.
3. Real-Time Awareness
To tie it all together, I built a beautiful, custom dashboard that shows me the exact state of my home’s energy economy.
I can see the live price of electricity color-coded (Green for cheap, Red for expensive), exactly how much power the Tesla is drawing, my current HVAC posture, and the upcoming price trends.
I also added a failsafe: if the house is drawing a massive amount of power (like running the dryer, the oven, and the dishwasher simultaneously) exactly when the grid prices spike, my smart speakers make a friendly AI-generated announcement to warn me that I’m burning cash.
Conclusion
A “smart home” shouldn’t just be a collection of lights you can control with your phone. It should be an active, intelligent steward of your resources.
By deeply integrating real-time market data with heavy-draw appliances like my HVAC and EV, I’ve essentially automated away the “work” of being energy conscious. I don’t sacrifice comfort or convenience, but I’ve permanently insulated myself from grid price shocks—and the annual savings easily pay for the networking hardware many times over.
If you’d like to see the open-source code or adapt this for your own Home Assistant setup, keep an eye out for my upcoming technical deep-dive!