Skip to content

Conversation

@chriszero
Copy link

Adds a new homeassistant inverter type that controls any inverter/battery system via Home Assistant service calls, making EOS Connect compatible with a much wider range of hardware.

Motivation

Many inverter/battery systems (Marstek, Sungrow, Goodwe, etc.) don't have a direct API but are controllable through Home Assistant entities — whether via
native HA integrations, ESPHome (e.g., RS485/Modbus), or other custom components. This interface bridges that gap by translating EOS optimization results into
HA service calls.

How it works

For each EOS state (charge_from_grid, avoid_discharge, discharge_allowed), the user defines a sequence of HA service calls in config.yaml. Each step specifies
a service, entity_id, and data or data_template (with {{ power }} for dynamic values from EOS).

Example use case: A Marstek battery connected via https://gist.github.com/chriszero/6940087c4fb3ef7552305602096f9d35 exposes select and number entities in
HA, which are then used by EOS Connect to switch operating modes and set charge/discharge limits.

Changes

  • src/interfaces/inverter_ha.py — New InverterHA class
  • src/eos_connect.py — Register homeassistant as inverter type
  • src/config.py — Add config keys (url, token, charge_from_grid, avoid_discharge, discharge_allowed)
  • docs/user-guide/configuration.html — Parameter reference, info box, Marstek config example, ESPHome Gist link
  • README.md — Mention HA inverter in features and config options

Tested since 26.12.2025 on my installation.

- Add inverter_ha.py with HA inverter control via REST API
- Support power limiting and status monitoring through Home Assistant
- Update config.py with HA inverter configuration options
- Register HA inverter interface in eos_connect.py
Document the new `homeassistant` inverter type:
- configuration.html: parameters, info box, and Marstek config example
- README.md: mention in features and minimal config comment
@stefanriegel
Copy link

awesome PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants