Get install quotes

Home Assistant Solar Integration: Complete UK Guide (Automations, Hardware, Dashboard)

By Sepehr· 31/05/2026

Affiliate links: This page contains affiliate links. If you buy through them, we may earn a commission at no extra cost to you. This does not affect our scoring or recommendations.

If you own a solar system with a battery, you're probably used to checking your inverter's app. It tells you what's generating, what's charging, what you're importing. But it doesn't talk to your other smart home devices. It can't charge your EV when surplus crosses a threshold, divert excess to your immersion heater, or charge your battery on cheap Octopus overnight slots automatically. Home Assistant can do all of that — and once it's set up, it runs without you thinking about it.

This guide walks you through the complete setup: hardware, connecting your specific inverter, configuring the Energy dashboard, and a full automation playbook with copy-paste YAML. It assumes you own a solar or battery system and have heard of Home Assistant but haven't integrated it yet. You don't need to be a developer, but you will need to be comfortable with a YAML editor and a browser-based admin panel.

Why connect solar to Home Assistant?

Manufacturer apps are fine for visibility. They're not good at action. The core reason to bring your solar system into Home Assistant is cross-system automation: your solar generation talking to your EV charger, your immersion heater, your battery, and your energy tariff simultaneously.

  • No cloud dependency: Most inverter apps rely on the manufacturer's cloud. When the cloud goes down (it does), your monitoring goes with it. Local integrations in HA talk directly to your device over your home network.
  • Real-time data: Cloud APIs poll every 5–15 minutes. Local integrations poll every 5 seconds. The difference matters for automations that respond to changing generation.
  • Octopus integration: Home Assistant has a mature Octopus Energy integration that exposes your current tariff slot price. Combined with your battery's state of charge, you can automate overnight charging that stops when the cheap window ends.
  • Cross-device automations: Your inverter app can't turn on your immersion heater when export exceeds 1kW. Home Assistant can.

Hardware you need

Running Home Assistant

Home Assistant needs a device running 24/7. The main options for UK buyers:

  • Raspberry Pi 5 (4GB) — recommended for most: Fast, quiet, low power (~5W idle). Run HA OS from an NVMe SSD via the official Pi 5 case with PCIe adapter for reliability. Raspberry Pi 5 on Amazon →
  • Home Assistant Green (~£90): Purpose-built, plug-and-play. Boot from USB, connect to your router, browse to homeassistant.local:8123. No configuration needed for the hardware side. Best option if you want to minimise setup time.
  • Home Assistant Yellow (~£130): Includes a built-in Zigbee/Thread radio. Worth it if you have other smart home devices on Zigbee. Overkill for solar-only.
  • Mini PC (Intel N100/N95): Best performance, can run other services alongside HA (Plex, Pi-hole). Overkill for solar-only use but a solid long-term platform if you plan to expand.

Inverter connectivity hardware

Depends on your inverter brand (covered per-brand below). The most common additional items:

  • RS485 to USB adapter — needed for Solis and other Modbus-based inverters. Buy an FTDI-chip-based adapter, not a cheap CH340 — the FTDI is more reliable under continuous polling. RS485 USB adapter on Amazon →
  • Short Cat6 Ethernet cable — for inverters that connect over LAN (Sungrow, some GivEnergy setups). Cat6 cable on Amazon →
  • GivEnergy, SolarEdge, Enphase: no additional hardware needed — these use cloud or LAN APIs that your existing network already supports.

Installing Home Assistant OS

This guide doesn't cover HA installation in depth — the official installation docs do that better than any third-party guide can. The short version: download the HA OS image for your hardware, flash it to your storage using Balena Etcher or Raspberry Pi Imager, boot the device connected to your router via Ethernet, and navigate to homeassistant.local:8123. The initial setup wizard takes about 10 minutes.

One important step before connecting your inverter: in HA, go to Settings → Add-ons → Add-on Store and install the File Editor add-on. You'll need it for editing YAML configuration files later.

Connecting your inverter

The integrations below are ordered from easiest to hardest to set up. Each section covers what hardware (if any) you need, where to find the integration, and what sensors it exposes.

GivEnergy (easiest — no extra hardware)

GivEnergy has the most polished Home Assistant integration of any UK inverter brand. It's available directly from the HA integration store (no HACS required): Settings → Devices & Services → Add Integration → search "GivEnergy".

You'll need your GivEnergy Cloud API key, which you generate from the GivEnergy portal under Account → API. The integration polls every 30 seconds and exposes: battery state of charge (%), charge/discharge power (W), solar generation power (W) and total today (kWh), grid import/export power (W) and total today (kWh), house consumption (W), and inverter temperature.

The integration also supports writing back to the inverter — you can set charge targets and mode via HA services, which is what makes the automations below work.

Limitation: Cloud-dependent. If GivEnergy's API is unavailable, your HA sensors will be unavailable. This is rare but worth knowing.

Sungrow (local LAN — no extra hardware)

Sungrow inverters support a local LAN integration via the SolarmanV5 protocol. This is better than cloud: 5-second polling, no dependency on Sungrow's servers.

Step 1: Install HACS (Home Assistant Community Store) if you haven't. Go to hacs.xyz for the one-click installation instructions.

Step 2: In HACS, search for "Solarman" and install the solarman integration by @StephanJoubert.

Step 3: Find your inverter's local IP address from your router's DHCP client list. Assign it a static IP so it doesn't change between reboots.

Step 4: Add the integration in HA: Settings → Devices & Services → Add Integration → Solarman. Enter the inverter's IP address and select your inverter model. The integration auto-discovers the correct sensor mappings for your model.

Solis / Ginlong

Solis gives you two options: local RS485 Modbus (better) or SolisCloud API (easier to set up).

Option A — Local RS485 (recommended): Wire an RS485-to-USB adapter to the inverter's COM port and plug it into your HA host's USB port. Most Solis inverters expose Modbus registers on the RS485 port — you query them directly at 5-second intervals with no cloud dependency.

Install the solis-modbus integration from HACS. In configuration.yaml add:

solis_modbus:
  host: /dev/ttyUSB0
  scan_interval: 10

The RS485 wiring uses a 2-wire connection (A+ and B−) from the inverter's COM terminal to the adapter. Your inverter manual shows the pinout. A short run of screened twisted-pair cable (2–5m) is sufficient.

Option B — SolisCloud API: Install the soliscloud integration from HACS. You'll need your SolisCloud API key and secret from the SolisCloud portal (Account → API Management). Polling interval is 5 minutes due to API rate limits. Good for energy tracking; too slow for responsive automations.

SolarEdge (cloud only)

SolarEdge's HA integration is built-in: Settings → Devices & Services → Add Integration → SolarEdge. You need your site ID (visible in the SolarEdge monitoring portal URL) and an API key from your account settings.

The integration polls every 15 minutes — the SolarEdge API enforces this rate limit. This makes it unsuitable for real-time automations like immersion divert. It's well suited for the Energy dashboard and long-term generation analysis. If you want real-time local data from a SolarEdge system, the Modbus TCP local interface is possible but must be enabled by your original installer via remote configuration.

Enphase (local Envoy recommended)

Enphase systems have an Envoy gateway on your local network. The built-in enphase_envoy integration (available since HA 2024.3) reads from the Envoy directly over LAN — much better than the cloud API. Settings → Devices & Services → Add Integration → Enphase Envoy. HA will auto-discover the Envoy if it's on the same network subnet.

Local polling is every 60 seconds. The integration exposes per-microinverter production data as well as system totals and, on systems with Enphase IQ Batteries, battery state of charge.

Setting up the Energy dashboard

Once your inverter is connected and sensors are populating, configure HA's built-in Energy dashboard: Settings → Energy.

Important: The Energy dashboard requires sensors in kWh (cumulative total), not W (instantaneous power). Most integrations expose both — you want the "total energy today" or "total lifetime" sensors, not the live power sensors.

If your integration only exposes instantaneous power (W), create a cumulative kWh sensor using HA's Riemann sum integral helper:

  1. Settings → Helpers → Create Helper → Riemann Sum Integral
  2. Select your solar generation power sensor (in W)
  3. Set method to Left, unit prefix to k, time unit to Hours
  4. This produces a cumulative kWh sensor suitable for the Energy dashboard

In the Energy dashboard configuration, add:

  • Solar panels: your solar generation kWh sensor
  • Home battery storage: your battery charge kWh sensor and battery discharge kWh sensor separately
  • Grid: your grid import kWh sensor and grid export kWh sensor

The dashboard populates from midnight. It takes a full day to produce meaningful data.

Automations deep dive

These are complete, copy-paste YAML automations. Paste each one into Settings → Automations → Create Automation → Edit in YAML. Adjust entity IDs to match your integration — go to Settings → Devices & Services → your integration → Entities to find the exact IDs for your setup.

Automation 1: Overnight battery charging on Octopus Go

Octopus Go has a fixed off-peak window (00:30–04:30 BST in summer, 00:30–05:30 GMT in winter). This automation starts charging at 00:30 if battery is below 90% and stops at 04:30.

automation:
  - alias: "Octopus Go - Start overnight charge"
    trigger:
      - platform: time
        at: "00:30:00"
    condition:
      - condition: numeric_state
        entity_id: sensor.givenergy_battery_percent
        below: 90
    action:
      - service: select.select_option
        target:
          entity_id: select.givenergy_charge_mode
        data:
          option: "Charge"
      - service: number.set_value
        target:
          entity_id: number.givenergy_battery_charge_limit
        data:
          value: 90

  - alias: "Octopus Go - Stop overnight charge"
    trigger:
      - platform: time
        at: "04:30:00"
    action:
      - service: select.select_option
        target:
          entity_id: select.givenergy_charge_mode
        data:
          option: "Normal"

For Solis users, replace the select.givenergy_* and number.givenergy_* service targets with the equivalent entities created by the solis-modbus integration — check your integration's entity list for the charge mode selector and charge limit number.

Automation 2: Dynamic charging on Octopus Agile

Agile prices vary by half-hour slot. This automation starts charging when the current slot drops below 10p/kWh and stops when it rises above that threshold. Requires the Octopus Energy HA integration installed via HACS.

automation:
  - alias: "Agile - Start charging on cheap slot"
    trigger:
      - platform: state
        entity_id: sensor.octopus_energy_electricity_current_rate
    condition:
      - condition: numeric_state
        entity_id: sensor.octopus_energy_electricity_current_rate
        below: 0.10
      - condition: numeric_state
        entity_id: sensor.givenergy_battery_percent
        below: 90
    action:
      - service: select.select_option
        target:
          entity_id: select.givenergy_charge_mode
        data:
          option: "Charge"

  - alias: "Agile - Stop charging when price rises"
    trigger:
      - platform: state
        entity_id: sensor.octopus_energy_electricity_current_rate
    condition:
      - condition: numeric_state
        entity_id: sensor.octopus_energy_electricity_current_rate
        above: 0.10
    action:
      - service: select.select_option
        target:
          entity_id: select.givenergy_charge_mode
        data:
          option: "Normal"

Adjust the 0.10 threshold to match your preference. Negative Agile prices happen several times per month — any threshold above 0.00 will capture those slots.

Automation 3: Solar surplus divert to immersion heater

Turn on your immersion heater when you've been exporting more than 1kW for 5 minutes. Requires a smart switch wired in series with the immersion circuit. A Shelly 1PM on Amazon → handles up to 16A (3.6kW) and integrates natively with HA.

automation:
  - alias: "Solar surplus - Turn on immersion"
    trigger:
      - platform: numeric_state
        entity_id: sensor.givenergy_export_power
        above: 1000
        for:
          minutes: 5
    action:
      - service: switch.turn_on
        target:
          entity_id: switch.shelly_immersion

  - alias: "Solar surplus - Turn off immersion"
    trigger:
      - platform: numeric_state
        entity_id: sensor.givenergy_export_power
        below: 500
        for:
          minutes: 2
    action:
      - service: switch.turn_off
        target:
          entity_id: switch.shelly_immersion

Automation 4: EV charging from solar surplus

This works best with a Zappi charger, which has a native HA integration. Install the myenergi integration from HACS, then use it to switch Zappi between Eco+ (solar only) and Stop modes based on generation.

automation:
  - alias: "Solar surplus - Start EV eco charging"
    trigger:
      - platform: numeric_state
        entity_id: sensor.givenergy_solar_power
        above: 1400
        for:
          minutes: 10
    condition:
      - condition: state
        entity_id: binary_sensor.zappi_car_connected
        state: "on"
    action:
      - service: select.select_option
        target:
          entity_id: select.zappi_charge_mode
        data:
          option: "Eco+"

  - alias: "Solar surplus - Stop EV eco charging"
    trigger:
      - platform: numeric_state
        entity_id: sensor.givenergy_solar_power
        below: 1000
        for:
          minutes: 5
    action:
      - service: select.select_option
        target:
          entity_id: select.zappi_charge_mode
        data:
          option: "Stop"

The 1,400W threshold corresponds to the minimum 6A charge current at 230V. Below this, most chargers won't start or will fault. If you have a 3-phase supply, adjust accordingly.

Automation 5: Battery reserve for evening peak

Preserve battery capacity for the evening peak (16:00–19:00) by raising the minimum discharge cut-off during the day. Useful on Octopus Flux or any time-of-use tariff where evening rates are significantly higher.

automation:
  - alias: "Battery - Set daytime reserve"
    trigger:
      - platform: time
        at: "10:00:00"
    action:
      - service: number.set_value
        target:
          entity_id: number.givenergy_battery_discharge_cutoff
        data:
          value: 40

  - alias: "Battery - Release reserve after peak"
    trigger:
      - platform: time
        at: "19:00:00"
    action:
      - service: number.set_value
        target:
          entity_id: number.givenergy_battery_discharge_cutoff
        data:
          value: 10

Automation 6: Notifications

Push notifications to the HA companion app on your phone. Install the Home Assistant app on iOS or Android, then your device appears as notify.mobile_app_your_device_name — check Settings → Integrations → Mobile App to find your exact entity name.

automation:
  - alias: "Notify - Battery fully charged"
    trigger:
      - platform: numeric_state
        entity_id: sensor.givenergy_battery_percent
        above: 99
    condition:
      - condition: time
        after: "06:00:00"
        before: "22:00:00"
    action:
      - service: notify.mobile_app_your_phone
        data:
          title: "Battery full"
          message: "Solar battery at 100%. Surplus going to grid."

  - alias: "Notify - Grid import spike"
    trigger:
      - platform: numeric_state
        entity_id: sensor.givenergy_import_power
        above: 3000
        for:
          minutes: 10
    action:
      - service: notify.mobile_app_your_phone
        data:
          title: "High grid import"
          message: "Importing over 3kW — check what's running."

Lovelace dashboard

The Energy dashboard (Settings → Energy) is the best place for historical analysis. For a real-time monitoring view, build a custom Lovelace dashboard. Install these HACS frontend cards first: power-flow-card-plus, mini-graph-card, and mushroom. All three are available in HACS under Frontend.

A minimal but useful dashboard configuration:

title: Solar
views:
  - title: Live
    cards:
      - type: custom:power-flow-card-plus
        entities:
          battery:
            entity: sensor.givenergy_battery_power
            state_of_charge: sensor.givenergy_battery_percent
          grid:
            entity: sensor.givenergy_grid_power
          solar:
            entity: sensor.givenergy_solar_power
          home:
            entity: sensor.givenergy_consumption_power

      - type: custom:mini-graph-card
        name: Solar generation today
        entity: sensor.givenergy_solar_power
        hours_to_show: 24
        points_per_hour: 4
        show:
          extrema: true

      - type: custom:mushroom-template-card
        primary: "Battery {{ states('sensor.givenergy_battery_percent') }}%"
        secondary: >
          {% if states('sensor.givenergy_battery_power') | float > 0 %}
            Charging at {{ states('sensor.givenergy_battery_power') }}W
          {% else %}
            Discharging at {{ (states('sensor.givenergy_battery_power') | float * -1) | round }}W
          {% endif %}
        icon: mdi:battery-charging

The power-flow-card-plus shows an animated real-time flow diagram of solar → battery → home → grid. It's the single most useful card for at-a-glance solar monitoring.

Community and next steps

The Home Assistant community is where you'll find brand-specific help when something doesn't behave as documented:

  • HA Community — Energy category: Active threads on every inverter brand. Search for your inverter model before posting — most problems have been solved.
  • GivEnergy HA thread: Search "GivEnergy" in the HA Community — the official integration maintainer is active and responsive.
  • Solis Modbus thread: Active community maintaining Modbus register maps for every Solis inverter generation. If your inverter model isn't in the HACS integration's dropdown, check this thread first.
  • Octopus Energy integration: The HomeAssistant-OctopusEnergy GitHub repo has a Discussions tab for support — very active.

If you want the monitoring capability without the YAML configuration, Solar Assistant is a commercial alternative that runs on a Raspberry Pi and integrates with many of the same inverters via Modbus. Less flexible than HA, but faster to get running if configuration isn't your thing.

Disclaimer: SmartSolarHomes provides educational information about home energy products and is not regulated financial advice. Savings and payback estimates depend on individual circumstances including bill amounts, usage patterns, install conditions, and tariffs. Always seek independent professional advice before purchase or install.