Home Assistant and GridZeno.
GridZeno has its own integration for Home Assistant. It finds the dongle on your network and gives you your readings, the energy counters for the Energy dashboard, the plan, your prices and the solar forecast. If you control the system yourself, you can also control it from Home Assistant. Here is the whole way, from installation to your own automations.
An animation of how Home Assistant and GridZeno work together: Home Assistant finds the dongle on your network, and you approve the connection in GridZeno with a 6-digit code. The readings go directly from the dongle to Home Assistant, even when the internet is down, the energy counters fill the Energy dashboard, and when you control the system yourself, Home Assistant can, for example, charge the battery from the grid. The steps are below the animation.
How it works
Connection
Directly between the dongle and Home Assistant on your own network. Nothing goes through GridZeno, and it also works when the internet is down.
Security
You approve Home Assistant in GridZeno with a 6-digit code. Every request is signed with a key that the dongle and Home Assistant create together, and that's never sent over the network.
Installation
As an integration from HACS, Home Assistant's catalogue of integrations made by others than Home Assistant itself.
How often
The readings every 5 seconds. The plan, the prices and the solar forecast when they change, and at least every 5 minutes.
All subscriptions
Solar, consumption, battery and grid right now, energy counters for the Energy dashboard, the plan, who is in control, and manual control.
Smart and Pro
Your buying and selling prices for every quarter hour today and tomorrow, the cheapest and most expensive quarter hours and GridZeno's solar forecast, also in the energy dashboard.
When GridZeno is in control
Home Assistant can only read, so two systems never write to the inverter at the same time.
Inverters
Growatt to begin with: that's the inverter the dongle both reads and controls today. We keep testing more inverters. If your inverter can't be controlled, you get an error, and you can then contact support.
What you need
- Home Assistant 2025.10 or newer on your home network.
- HACS installed in Home Assistant.
- Your GridZeno Dongle on the same network, with the firmware that includes Home Assistant. The dongle updates itself from GridZeno.
- A Growatt inverter that the dongle is connected to.
- Your GridZeno account in the browser or the app, so you can approve the connection.
- Smart or Pro, if you want your prices and the solar forecast included. The rest also works on Light.
Install the integration
- Open HACS in Home Assistant.
- Find GridZeno. If GridZeno isn't in HACS' own list, add github.com/GridZeno/gridzeno-home-assistant under Custom repositories with the type Integration. You can also open it directly in your Home Assistant.
- Get the integration with Download.
- Restart Home Assistant.
Connect the dongle
It takes a few minutes, and you only need to do it once.
- Find the dongle. Home Assistant finds it by itself on your network. Under Settings, Devices & services it's listed as discovered: press Add, and answer yes to Connect GridZeno GZ-…?
- Or type the address. If Home Assistant doesn't find it, add the GridZeno integration, and type the dongle's address. You find it under Address on your network on the Dongle page in GridZeno. The port is 80.
- See the code. Home Assistant shows a 6-digit code and waits for you.
- Approve in GridZeno. Open Integrations, Home Assistant in the browser or the app. If the same code is shown there, choose Read only or Read and control, and press Approve. If a different code is shown, press Refuse: then it isn't your dongle you're talking to.
- Done. Home Assistant carries on by itself once the dongle has been told, and the readings arrive straight away.
The request expires after 10 minutes. There can be up to four Home Assistants on one dongle. The dongle's own page can also approve a Home Assistant, but only to read.
Read only or read and control
You choose when you approve. Read only gives all readings, counters, the plan and, with Smart and Pro, the prices and the solar forecast. Read and control also gives Command, the five numbers for it and the button Give the inverter its own settings back, and Home Assistant can use GridZeno's actions.
If you want to change later, remove the access under Integrations, Home Assistant in GridZeno. Home Assistant then asks you to connect again, and you approve with the new choice. Even with permission to control, Home Assistant only controls when you control the system yourself.
What you get in Home Assistant
The dongle becomes one device in Home Assistant, GridZeno GZ-A1B2C3, with entities as in the table. The names are in English, whatever language your Home Assistant is set to. The IDs begin with gridzeno_gz_ and the dongle's number in lower case: GZ-A1B2C3 gives sensor.gridzeno_gz_a1b2c3_battery. You can always see them, and give them other names, under the device.
| Name | ID | What it is |
|---|---|---|
| Right now, every 5 seconds | ||
| Solar power | sensor. | The solar panels' power in W. |
| String 1, String 2 … | sensor. | The power from each solar string, one for each string the inverter has. |
| Grid import | sensor. | What you're buying from the grid right now. |
| Grid export | sensor. | What you're selling to the grid right now. |
| House consumption | sensor. | Calculated as in GridZeno: solar, import and battery out, minus export and battery in. |
| Battery power | sensor. | Positive when the battery is charging, and negative when it's discharging. |
| Battery charging | sensor. | What the battery is taking right now. Never negative, so it's easy to use in graphs. |
| Battery discharging | sensor. | What the battery is giving right now. Never negative. |
| Battery | sensor. | The battery's state of charge in per cent. |
| Energy in kWh, for the Energy dashboard | ||
| Solar energy | sensor. | All solar energy since the dongle started counting. |
| Energy bought | sensor. | All the power you have bought from the grid. |
| Energy sold | sensor. | All the power you have sold to the grid. |
| Energy into the battery | sensor. | All the energy the battery has taken. |
| Energy out of the battery | sensor. | All the energy the battery has given. |
| House energy | sensor. | The house's consumption, calculated as above. |
| Solar energy today, Bought today … | sensor. | The same six for today. They start again at midnight. |
| Prices and solar forecast, Smart and Pro | ||
| Buy price | sensor. | Your buying price right now in DKK per kWh, as you see it under Electricity prices in GridZeno. The attribute prices has every quarter hour today and tomorrow with buying price, selling price and spot price. |
| Sell price | sensor. | What you get for a kWh you sell right now. |
| Spot price | sensor. | The power exchange's price right now, with nothing added. |
| Cheapest quarter today | sensor. | When the buying price is lowest today. The attribute price is the price. |
| Dearest quarter today | sensor. | When the buying price is highest today. |
| Cheapest quarter tomorrow | sensor. | The same for tomorrow, once tomorrow's prices are out, usually around 13:00. |
| Dearest quarter tomorrow | sensor. | And the dearest quarter hour tomorrow. |
| Solar forecast today | sensor. | GridZeno's solar forecast for the whole day in kWh. |
| Solar forecast rest of today | sensor. | What the forecast expects from now until sunset. |
| Solar forecast tomorrow | sensor. | The forecast for the whole of tomorrow. |
| The plan and the control | ||
| Plan now | sensor. | What the plan is doing now: Charging from the sun, Charging from the grid, Holding the battery, Selling solar power, Battery covers the house, Selling from the battery, Buying from the grid or Nothing to do. |
| Plan now until | sensor. | When it ends. |
| Plan next | sensor. | The next thing the plan does. |
| Plan next from | sensor. | When it starts. |
| Control | sensor. | GridZeno controls or You control, as you have chosen under Automatic in GridZeno. |
| Controlled by | sensor. | Who is in charge of the inverter right now: GridZeno, Home Assistant or The inverter itself. |
| Diagnostics | ||
| Reads the inverter | binary_ | Whether the dongle can read the inverter. |
| Connected to GridZeno | binary_ | Whether the dongle is in contact with GridZeno. |
| Plan out of date | binary_ | Whether the dongle's plan is too old, for example because the internet has been down. |
| Last reading | sensor. | When the dongle last read the inverter. |
| Last contact with GridZeno | sensor. | When the dongle last talked to GridZeno. |
| Last command check | sensor. | Whether the inverter did what it was asked: Checking, Confirmed, Not confirmed, At a limit or Ended. |
| Inverter temperature | sensor. | And Power module temperature, Boost temperature and Battery temperature, when the inverter reports them. |
| WiFi signal | sensor. | The dongle's WiFi signal. Disabled by default: enable it under the device if you want to follow it. |
| Uptime | sensor. | How long the dongle has been running since it last started. Disabled by default. |
| Consumption (inverter register) | sensor. | The inverter's own figure for consumption, which can be too high. Disabled by default. |
| Control, only with Read and control | ||
| Command | select. | What the system is doing for Home Assistant right now, and what you choose: The inverter's own settings, Charge from the grid, Hold the battery, Sell from the battery or Limit selling to the grid. |
| Command: charge target | number. | Charge to this level. 80 % by default. |
| Command: sell power | number. | How hard to sell, from 100 W up to the inverter's rated power. 3,000 W by default. |
| Command: sell floor | number. | Don't sell below this level. Without a number, your minimum in GridZeno is used. |
| Command: duration | number. | How long, from 15 minutes to 12 hours in steps of 15. 60 minutes by default. |
| Command: export limit | number. | For Limit selling to the grid: at most this share of the inverter's power. 0 % by default, which stops selling. |
| Give the inverter its own settings back | button. | Stops a command at once. Can only be pressed while Home Assistant is in control. |
Without Smart or Pro, the prices and the solar forecast show as unavailable. If the latest reading is more than a minute old because the dongle can't read the inverter, the readings also show as unavailable, so an automation never works on old figures.
The counters are kept in the dongle and never go backwards. They start at 0 when the dongle gets the new firmware, and after a power cut they can miss at most the last 10 minutes. Your history from before is still in GridZeno, and you can download it under Profile, Download your data.
The Energy dashboard
Under Settings, Dashboards, Energy in Home Assistant, you choose:
- Grid consumption: Energy bought. For the price, choose to use an entity with the current price, and Buy price.
- Return to grid: Energy sold, with Sell price as the price.
- Solar panels: Solar energy. Tick GridZeno under solar forecast.
- Battery: Energy into the battery as energy in and Energy out of the battery as energy out.
Home Assistant works out the house's consumption by itself from the four, so House energy shouldn't be added. It's for your own graphs. With Light there are no prices and no solar forecast from GridZeno: choose a fixed price, or leave the price out.
A card on your dashboard
All entities can be used on your dashboards. Two cards to start with: paste them as YAML into a new card, and replace a1b2c3 with your own dongle number.
type: entities
title: GridZeno
entities:
- sensor.gridzeno_gz_a1b2c3_plan_now
- sensor.gridzeno_gz_a1b2c3_plan_now_until
- sensor.gridzeno_gz_a1b2c3_control
- sensor.gridzeno_gz_a1b2c3_battery
- sensor.gridzeno_gz_a1b2c3_buy_price
- sensor.gridzeno_gz_a1b2c3_sell_price
- select.gridzeno_gz_a1b2c3_command
- number.gridzeno_gz_a1b2c3_command_duration
- button.gridzeno_gz_a1b2c3_give_the_inverter_its_own_settings_backtype: history-graph
title: Power today
hours_to_show: 24
entities:
- sensor.gridzeno_gz_a1b2c3_solar_power
- sensor.gridzeno_gz_a1b2c3_house_consumption
- sensor.gridzeno_gz_a1b2c3_grid_import
- sensor.gridzeno_gz_a1b2c3_grid_exportIf your Home Assistant is only allowed to read, remove the last three lines from the first card: the command doesn't exist for it.
Control the system from Home Assistant
Only for a Home Assistant you have allowed to control, and only when you control the system yourself under Automatic.
- Control it yourself. Choose Yourself under Automatic in GridZeno. GridZeno then no longer writes to the inverter.
- Set the numbers. Under the device, set what the next command asks for: Command: charge target, Command: sell power, Command: sell floor, Command: duration and Command: export limit. Home Assistant remembers them, also after a restart.
- Choose the command. Choose Charge from the grid, Hold the battery, Sell from the battery or Limit selling to the grid under Command. It's sent with the numbers as they are, and Command then shows what is running.
- Stop it whenever you want. Choose The inverter's own settings, or press Give the inverter its own settings back.
Changing a number doesn't change a command that's running. Choose the command again, and the new one replaces the old one.
- Charge from the grid
- Charges the battery from the grid to the target. At the target the battery stays still, and the house buys from the grid until the time is up.
- Hold the battery
- Keeps the battery as it is: the house uses the sun and the grid.
- Sell from the battery
- Discharges the battery with the power you have chosen, and stops at the floor. What the house doesn't use itself is sold.
- Limit selling to the grid
- Sets the inverter's sale limit as a share of its power. 0 % stops selling.
The rules
- The duration is a safeguard: from a quarter hour to 12 hours. After that, the inverter gets its own settings back by itself.
- The limits are yours: a target or a floor outside the battery's minimum and maximum from GridZeno is refused with an explanation, not adjusted. That way Home Assistant never believes it has asked for something that doesn't happen.
- GridZeno wins: if you switch back to Automatic, Home Assistant's command stops at once.
- One at a time: at most one command runs, no matter how many Home Assistants are connected.
- The same path as GridZeno: a command runs through the same functions and safety limits as GridZeno's own control, and the dongle checks afterwards that the inverter did it. A command doesn't touch the battery limits in the inverter.
- A restart stops it: the dongle never starts with a command running. The inverter gets its own settings back.
- GridZeno can see it: while a command is running, GridZeno shows what Home Assistant has started and until when.
The actions
Your automations can do the same with GridZeno's own actions, where everything is in one call:
| Action | Name | Fields |
|---|---|---|
gridzeno. | Charge from the grid | Dongle, target (target_soc), duration (duration) and optionally export limit (export_limit). |
gridzeno. | Hold the battery | Dongle, duration and optionally export limit. |
gridzeno. | Sell from the battery | Dongle, power in W (power), optionally floor (floor_soc), duration and optionally export limit. |
gridzeno. | Limit selling to the grid | Dongle, export limit and duration. |
gridzeno. | Give the inverter its own settings back | Dongle. |
You choose the dongle in the action's editor. In YAML the field is called config_entry_id, and Home Assistant fills in the dongle's id itself once you have chosen it.
Automations
Examples you can start from. Replace a1b2c3 with your own dongle number.
The first three control the system. They all have a condition so that they only run when you control it yourself: otherwise the dongle refuses the command. The price and the cheapest and dearest quarter hour require Smart or Pro.
Charge the battery in today's cheapest quarter hour
Sets the target and the duration and then chooses Charge from the grid. The numbers are set first, because the command is sent with them as they are.
alias: Charge the battery in today's cheapest quarter hour
triggers:
- trigger: time
at: sensor.gridzeno_gz_a1b2c3_cheapest_quarter_today
conditions:
- condition: state
entity_id: sensor.gridzeno_gz_a1b2c3_control
state: manual
actions:
- action: number.set_value
target:
entity_id: number.gridzeno_gz_a1b2c3_command_charge_target
data:
value: 80
- action: number.set_value
target:
entity_id: number.gridzeno_gz_a1b2c3_command_duration
data:
value: 60
- action: select.select_option
target:
entity_id: select.gridzeno_gz_a1b2c3_command
data:
option: charge_gridSell from the battery in today's dearest quarter hour
Same idea with the action Sell from the battery, where the power, the floor and the duration are in the call. config_entry_id is the dongle's ID in your Home Assistant.
alias: Sell from the battery in today's dearest quarter hour
triggers:
- trigger: time
at: sensor.gridzeno_gz_a1b2c3_dearest_quarter_today
conditions:
- condition: state
entity_id: sensor.gridzeno_gz_a1b2c3_control
state: manual
actions:
- action: gridzeno.sell_from_battery
data:
config_entry_id: 01JA2B3C4D5E6F7G8H9J0KLMNP
power: 5000
floor_soc: 40
duration: 30Stop selling at negative prices
GridZeno does this itself when it's in control. The example is for you if you control the system yourself. The price changes every quarter hour, so choose a duration that fits, or press Give the inverter its own settings back when the price is positive again.
alias: Stop selling at negative prices
triggers:
- trigger: numeric_state
entity_id: sensor.gridzeno_gz_a1b2c3_sell_price
below: 0
conditions:
- condition: state
entity_id: sensor.gridzeno_gz_a1b2c3_control
state: manual
actions:
- action: gridzeno.limit_export
data:
config_entry_id: 01JA2B3C4D5E6F7G8H9J0KLMNP
export_limit: 0
duration: 60Get told about tomorrow's cheapest quarter hour
Read only, so it also works when GridZeno is in control. Replace notify.notify with your own, for example your phone's.
alias: Tell me tomorrow's cheapest quarter hour
triggers:
- trigger: state
entity_id: sensor.gridzeno_gz_a1b2c3_cheapest_quarter_tomorrow
not_to:
- unknown
- unavailable
actions:
- action: notify.notify
data:
message: >-
Tomorrow, power is cheapest at
{{ as_timestamp(states('sensor.gridzeno_gz_a1b2c3_cheapest_quarter_tomorrow')) | timestamp_custom('%H:%M') }}
at DKK {{ state_attr('sensor.gridzeno_gz_a1b2c3_cheapest_quarter_tomorrow', 'price') | round(2) }} per kWh.The average price as a template
The buying price's attribute prices has every quarter hour today and tomorrow. As a template sensor under Helpers, this template gives the average of the known quarter hours:
{% set prices = (state_attr('sensor.gridzeno_gz_a1b2c3_buy_price', 'prices') or [])
| map(attribute='buy') | select('number') | list %}
{{ (prices | sum / prices | count) | round(2) if prices else none }}Security and your data
- Pairing: the dongle and Home Assistant create a shared key with a key exchange. The key is never sent over the network, and the 6-digit code is calculated from both their keys, so no one in between can make the two codes match.
- Every request is signed, and so is every answer. A reading has a counter, and a command a one-time number from the dongle, so nothing can be sent again by someone else.
- GridZeno doesn't know the key. It's only in the dongle and in your Home Assistant, so our server can neither read from the dongle nor control it that way.
- The traffic isn't encrypted on your network. Others on the network can see the readings, as they can on the dongle's own page, but they can neither query the dongle nor control it.
- What GridZeno stores: your Home Assistant's name, whether it may read or also control, its address on your network, the code, when you approved it, and when the dongle last saw it. It's deleted as soon as it no longer has access. Read the privacy policy.
If something goes wrong
- Home Assistant doesn't find the dongle: type the dongle's address from the Dongle page in GridZeno. The dongle and Home Assistant must be on the same network. If Home Assistant runs in a container without access to the host's network, or on a different network from the dongle, discovery doesn't get through, but the address works.
- The code is different in GridZeno: refuse the request, and try again from Home Assistant.
- The request expired: it's valid for 10 minutes. Start again from Home Assistant.
- Home Assistant asks to connect again: the access has been removed in GridZeno, or the dongle has a new owner. Connect and approve it again.
- The dongle has a new address: Home Assistant finds it again by itself on the network. Otherwise, correct the address in the integration's settings.
- The prices show as unavailable: they require Smart or Pro, and that the dongle has fetched them from GridZeno.
When the dongle says no to a command, Home Assistant shows why:
- GridZeno controls the plant. Choose to control it yourself under Automation in GridZeno first.
- Choose Yourself under Automatic in GridZeno, or give your automation a condition so that it only runs when you're in control yourself.
- This Home Assistant may only read.
- Remove the access in GridZeno, connect Home Assistant again, and choose Read and control.
- The target is outside the battery limits you set in GridZeno.
- The target must be above your minimum and at most your maximum under Automatic. The same applies to the sell floor.
- The power is outside what the inverter can do.
- Sell with at most the inverter's rated power.
- The duration must be 15 minutes to 12 hours.
- Choose a duration from 15 to 720 minutes.
- The plant has no battery.
- Without a battery, Home Assistant can only limit export.
- GridZeno may not change the export limit on this inverter.
- The inverter's sale limit is in a mode GridZeno doesn't touch, for example as your installer set it up. Write to us, and we'll look at it.
- Control from Home Assistant is not switched on on this dongle yet.
- The dongle can read, but its firmware is built without control. Write to us, and we'll find the right version.
- The dongle did not answer.
- Check that the dongle has power and is on the network. The Dongle page in GridZeno shows whether it's online.
- The dongle's answer could not be trusted (no valid signature).
- Try again. If it happens again, something on the network may be in the way. Write to us.
Remove Home Assistant again
- In Home Assistant: delete the integration under Devices & services. It also removes itself from the dongle.
- In GridZeno: press Remove access under Integrations, Home Assistant. It can then no longer talk to the dongle, and it asks to be connected again. Delete it in Home Assistant if you don't want it back.
- New owner: if the dongle gets a new owner, or you remove it from your account, all Home Assistants lose their access.
Questions and answers
Does it cost anything?
No. The integration is included in all subscriptions. The prices and the solar forecast require Smart or Pro.
Does it work without the internet?
Yes. The readings and the commands go directly between Home Assistant and the dongle. The dongle uses what it was last told by GridZeno: whether you control the system yourself, and your limits for the battery. The prices and the forecast aren't updated until the internet is back.
Can I use it when I am not at home?
The integration only talks to the dongle on your own network. You can reach your Home Assistant from outside as you usually do.
Can Home Assistant and GridZeno be in control at the same time?
No. When GridZeno is in control, Home Assistant can only read. If you control the system yourself, Home Assistant can control it, and if you switch back to Automatic, GridZeno wins at once.
I have several dongles.
Each dongle is connected separately and becomes its own device in Home Assistant.
Does GridZeno see what my Home Assistant does?
We don't see what Home Assistant asks the dongle. We see which Home Assistants are connected, and a command while it's running.
Has the integration been released?
Yes. We keep updating it and send new firmware versions to the dongle and new updates to Home Assistant.
Ready for cheaper
power?
Check whether your inverter fits, and let the plan charge the battery and sell power in the right quarter hours.