Harnessing Excess Solar Energy to Power Your Appliances with Home Assistant

One of the great joys of having a smart home is automating mundane tasks—but when you add renewable energy into the mix, the fun (and savings) multiply. Imagine using your dishwasher and washing machine only when your solar panels are producing excess energy or electricity prices are negative. Not only do you save money, but you also pat yourself on the back for being environmentally conscious. Let me walk you through how I accomplished this with Home Assistant, a little bit of automation magic, and some good old-fashioned solar power.

The Dream: Let the Sun Do the Work

Picture this: the sun is shining, your solar panels are cranking out kilowatts like nobody’s business, and instead of letting that energy go back to the grid for peanuts, you’re using it to run your power-hungry appliances. For me, this means the dishwasher and washing machine—two machines that, without automation, seem to have their own agenda (and it’s not solar-friendly).

The plan was simple:

  • Start the dishwasher when there’s enough excess solar energy or electricity prices dip below a threshold.
  • Fire up the washing machine under the same conditions, but only if a program has been selected.
  • Make sure both automations are idiot-proof (read: family-friendly) by adding clear controls near each appliance.

The Automation Setup

Here’s how it all works.

Solar Energy Logic

The brains of these automations hinge on monitoring solar energy production and consumption:

  • Excess Energy Trigger: If my solar panels are producing 2 kW more than my house is consuming for at least 10 minutes (or 15 minutes for the washing machine), the automation kicks in.
  • Negative Prices Trigger: Electricity prices below a specific threshold (say, 0.133 €/kWh) can also start the appliances.

Dishwasher Automation

The dishwasher’s automation involves an input_boolean to signal readiness. This boolean is toggled by a button conveniently placed near the dishwasher. Here’s the flow:

  1. If excess solar power or cheap electricity is available and the boolean is ON, the dishwasher starts.
  2. Once it’s running, the boolean turns OFF to prevent repeated triggering.
alias: Autostart Dishwasher
triggers:
  - platform: template
    value_template: >
      {% set netto = states('sensor.smartmeter_power_production') | float - states('sensor.smartmeter_power_consumption') | float %}
      {{ netto > 2000 }}
    for: '00:10:00'
  - platform: numeric_state
    entity_id: sensor.huisje_electricity_price
    below: 0.133
  - platform: state
    entity_id: input_boolean.autostart_dishwasher
    to: 'on'
conditions:
  - condition: template
    value_template: >
      {% set netto = states('sensor.smartmeter_power_production') | float - states('sensor.smartmeter_power_consumption') | float %}
      {{ (netto > 2000 or states('sensor.huisje_electricity_price') | float <= 0.133) and states('input_boolean.autostart_dishwasher') == 'on' }}
actions:
  - service: button.press
    target:
      entity_id: button.dishwasher_start_button
  - service: input_boolean.turn_off
    target:
      entity_id: input_boolean.autostart_dishwasher
mode: single

Washing Machine Automation

The washing machine needs an extra layer of smarts. It only starts if:

  1. Excess solar energy or cheap electricity is available.
  2. A program has been selected (detected via the washing machine’s status sensor).
  3. An input_boolean for autostart is toggled ON.
alias: Autostart Washing Machine
triggers:
  - platform: template
    value_template: >
      {% set netto = states('sensor.smartmeter_power_production') | float - states('sensor.smartmeter_power_consumption') | float %}
      {{ netto > 2000 }}
    for: '00:15:00'
  - platform: numeric_state
    entity_id: sensor.huisje_electricity_price
    below: 0.133
  - platform: state
    entity_id: input_boolean.autostart_washingmachine
    to: 'on'
conditions:
  - condition: template
    value_template: >
      {% set netto = states('sensor.smartmeter_power_production') | float - states('sensor.smartmeter_power_consumption') | float %}
      {{ (netto > 2000 or states('sensor.huisje_electricity_price') | float <= 0.133) and states('sensor.washing_machine_status') == 'programmed' and states('input_boolean.autostart_washingmachine') == 'on' }}
actions:
  - service: button.press
    target:
      entity_id: button.washing_machine_start_button
mode: single

Wrap-Up: Smarter Homes, Happier Wallets

With these automations in place, I’ve transformed my solar energy into a powerhouse (pun intended) for running appliances. No more scrambling to start the washing machine when the sun is shining. No more guilt about running the dishwasher at peak grid hours. And best of all, the family finds it so easy to use, they actually use it.

So go ahead, give your solar panels something to do and let Home Assistant take the wheel. Your wallet and the planet will thank you.

And if you ever hear your appliances humming happily during a sunny afternoon, don’t worry. That’s just them thanking you for being awesome.

Unknown's avatar

Author: Peter Groenewegen

Hi, I’m Peter Groenewegen—a technologist, developer advocate, and AI enthusiast passionate about building tools that truly fit people’s workflows. My journey in tech has been one of innovation, collaboration, and a relentless curiosity to make the complex simple.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.