Home Assistant – Solis Battery Charging Automations & Cards (LT/EN)

Buy Me A Coffee

🔵 This is the English version.

🟡 Lietuviška versija · Website

Overview

This repository contains several automations that help operate and maintain batteries connected to a Solis inverter. You can adapt the logic to other inverter brands by selecting the appropriate sensors; however, this project is built around the Solis modbus integration.
I use a Waveshare Modbus adapter, so my Solis sensor entity IDs follow that naming. You will likely need to adjust the entity IDs to match your setup.

My Solis dashboard looks like this:

dashboard

Home Assistant automations and Lovelace cards are provided in two languages: Lithuanian (LT) and English (EN). LT is the default; every directory has an EN counterpart.

Structure

automations/
  ├─ lt/  # Lithuanian automations (YAML)
  └─ en/  # English automations (YAML)
cards/
  ├─ lt/  # Lithuanian Lovelace cards (YAML)
  └─ en/  # English Lovelace cards (YAML)
helpers/
  ├─ lt/helpers_lt.yaml  # LT helpers with icons
  └─ en/helpers_en.yaml  # EN helpers with icons

How to use

  1. Helpers
    These automations and cards rely on multiple helpers (entities). Please create them first. IMPORTANT: use a single language across automations, cards, and helpers — either English only or Lithuanian only.
    • YAML users: include helpers/en/helpers_en.yaml or helpers/lt/helpers_lt.yaml in configuration.yaml.
    • If you created helpers via the UI, use the files as a reference for names/icons and double‑check the Entity IDs.
  2. Automations
    • The provided YAML is ready for copy/paste into a new UI automation:
      Settings → Automations & Scenes → + Create automation → Create new automation → (top‑right) ⋮ → Edit in YAML → clear the editor and paste the selected automation’s .yamlSave.
    • Alternatively, place the YAML into config/automations/ (you may need to adapt the script block format) and reload automations.

Automations explained

Battery charging from solar – daytime logic

[!IMPORTANT] NOTE: this automation is intended for setups where the PV system’s instantaneous feed‑in limit (as defined by your grid operator) can be exceeded, the user is on a fixed‑rate electricity plan and uses net‑metering. If you have net‑billing, exchange/spot‑price plans, or want to participate in grid balancing, you’ll need different automations (I may add them in the future).

Generation forecast

This script requires an additional Home Assistant integration: Solcast_forecast.
It uses a couple of sensors to evaluate today’s total generation forecast and today’s peak generation.
Goal: decide whether there will be enough solar production today and plan when to charge the batteries so they reach 100% by night.

How it works:

Download the card — Solar Generation Forecasts card
Download the automation — Solar Daytime Charging


Planned grid outages

Grid planned outages

In my area, planned outages are almost always in the morning, when the batteries have discharged overnight and the PV system has not yet ramped up. When you receive a planned‑outage notice from the grid operator, you can make sure the batteries are fully charged on that day.

This requires the Local Calendar integration. Create a calendar named exactly “grid planned outages” so the entity becomes calendar.grid_planned_outages:
Home Assistant → Settings → Devices & Services → + Add integration → “Local calendar” → set Calendar name to grid planned outages and tick Create an empty calendarSubmitFinish.
Verify the entity exists as calendar.grid_planned_outages.

How it works:

Download the card — Grid Planned Outages card
Download the automation — Grid Planned Outage – Preparation & Restore
Download the event‑creation automation — Create Grid Event from Card


Winter Mode

Winter mode

In winter, solar generation is low while heating loads are higher, so batteries are less useful for daily cycling — but they still serve their backup role. This automation:

Download the card — Winter Mode & Reserves card
Download the automation — Winter Mode Reserve


Preventive battery charging

Preventive charging

In winter, batteries rarely reach 100% from solar alone, which may accelerate degradation over long periods. This automation ensures a periodic full charge.

Download the card — Preventive Battery Charging card
Download the automation — Solar – Periodic Charging

Final words

I’m still a relatively new user of a hybrid PV‑battery system, so there is always room for improvement and I may have missed some edge cases. Feedback and suggestions are welcome, and I’ll keep refining these automations as time permits.

If you find this useful, you can support my work:

Buy Me A Coffee

View repository on GitHub   Download ZIP

View repository on GitHub →