Infrastructure/Case study 04

Home Assistant and energy management

Automation of a home and a balcony solar installation, with logic that follows the electricity tariff.

  1. Sensors
  2. Home Assistant
  3. Automations
  4. Battery, devices, notifications

Installation

A balcony solar installation with a battery supplies part of the home's electricity. Home Assistant reads production and consumption, then controls battery charging. A set of automations handles dynamic charge scheduling, tariff-aware mode switching and solar overflow protection.

Tariff

The tariff has off-peak and peak hours. No schedule is hard-coded, because they are going to change: automations read a sensor dedicated to off-peak hours.

Battery strategy

Since September 2026, the battery no longer charges from the grid at night. It only shifts solar production to the hours when the tariff is highest. A measuring plug acts as an injection meter: it is more accurate than the manufacturer's telemetry. The base load is fixed at 55 W, which corresponds to the always-on server, because the manufacturer's API does not keep up fast enough for real-time tracking.

Other automations

A ventilation automation is based on the temperature difference between indoors and outdoors. Consumption sensors have been rebuilt more than once: the first version was charming, but fragile.

Notifications and dashboard

Notifications are limited to what needs immediate action, such as a real power cut. The dashboard uses compact cards and hides what is unavailable.