Skip to content

About

Charge your home battery from the grid during a cheap tariff window, sized from tomorrow's PV forecast.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Inverter Charge Night

Charge your home battery in the cheap night window – exactly as much as tomorrow's sun will not cover.

HACS Custom Latest release Home Assistant 2025.2 or newer CI MIT licence

English · Deutsch


Inverter Charge Night is a Home Assistant integration for households with a time-of-use tariff: the German §14a EnWG reduced grid fee, a night tariff, or the cheap hours of a dynamic tariff. Every night it decides how full the battery has to be when the cheap window closes, charges it to exactly that level, and leaves the rest of the capacity free for tomorrow's sun.

A night and the following day: the battery is charged to the target in the cheap window, carries the house until the PV takes over, and the PV fills it during the day

  • Too empty and the house buys expensive energy in the morning or evening.
  • Too full and the sun has nowhere to go: it is fed into the grid for a fraction of what the night energy cost.
  • The target lies between these two: enough for the morning and the evening, room for the sun.

Highlights

  • 🔋 Plans with tomorrow's forecast and your house's real consumption. It learns your house's hourly consumption over the last two weeks and models tomorrow's PV curve.
  • 🛟 A safety buffer that never causes feed-in. You choose how much reserve you want. It only fills room the sun leaves free, and it is bought once, not every night.
  • 🌡️ Weather-aware. It is optional and learns how much more a heat pump draws on a cold day.
  • 🌆 Evening reserve. It buys the energy for an expensive evening peak at night, and has an optional high-price rescue for days that turn out duller than forecast.
  • ⚡ House connection protection. With wallboxes on the same connection, the battery gives way before the main fuse does.
  • 📉 Efficiency search. It measures at which charge power your inverter loses the least energy.
  • 🎓 Learns from your data. It finds out, season by season, how far your PV forecast is off, and what your battery really holds and loses.
  • 🔌 Power cut aware. In island operation it lets go of the inverter at once.
  • ↩️ Everything it changes, it gives back. It restores the minimum SOC, the switches and the limits at the end of the window, also after a restart.
  • 🧩 Works with any inverter. All it needs is a minimum SOC, a grid charge switch and a state of charge as Home Assistant entities. It is developed on a Kostal Plenticore G3 with KOSTAL KORE.
  • 🇬🇧🇩🇪 Fully in English and German, set up entirely in the user interface.

Quick start

Open your Home Assistant instance and open this repository in HACS.

  1. Add this repository to HACS with the button above (type Integration). Download Inverter Charge Night and restart Home Assistant.
  2. Settings → Devices & services → Add integration → Inverter Charge Night.
  3. Fill in the two required pages: the inverter's minimum SOC, grid charge switch, state of charge, battery capacity, tomorrow's PV forecast, and the charging window.
  4. Watch the Target SOC sensor for a night or two. Then add the recommended options: planner mode Bridge, a house consumption meter, a safety buffer, the charge limit and the island detection.

Step by step: Installation and first setup.

Documentation

Installation and first setup Requirements, HACS, the setup dialog, recommended next steps
How it works One night step by step, how the target is calculated, buffer, weather, evening reserve
Configuration reference Every setting with its default, and suggested setups
Safety Restoring settings, house connection, power cut, lost communication
Efficiency search Finding the charge power with the smallest loss
What ICN learns by itself The forecast by season, the usable capacity, both efficiencies
Exceptions and extras Skip, override, snow nights, high-price rescue, PV shortfall, curtailment
Entities and actions All entities and attributes, actions, automation examples
Dashboard A ready-made dashboard view
Troubleshooting and FAQ Repair issues, debug logs, diagnostics, common questions
Kostal with KOSTAL KORE Which entity goes where, and the traps
Morning discharge The experimental opposite mode
Development Checks, lab, architecture, releases

Requirements

  • Home Assistant 2025.2 or newer.
  • An inverter integration that exposes a writable minimum SOC (number), a grid charge switch and the state of charge (sensor). Examples are KOSTAL KORE, Kostal Plenticore, SMA, Fronius, Solax or your own Modbus setup.
  • A PV forecast for tomorrow in kWh, for example Solcast or Forecast.Solar.

Safety first

ICN writes to a device that powers your house. It changes nothing outside the window and gives back everything it changed. It charges less rather than more when a reading is missing, and it lets go of the inverter during a power cut. Read the safety page before you let it run unattended, especially if a wallbox shares the house connection.

Support and contributing

  • Questions and problems: GitHub issues. Please attach the diagnostics, and a debug log of the night if you can (how).
  • Changes: see Development. Pull requests are welcome.
  • Release history: CHANGELOG.

Licence

MIT, without warranty. Controlling an inverter and a battery is at your own risk.

About

Charge your home battery from the grid during a cheap tariff window, sized from tomorrow's PV forecast.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages