+1

Your cart is empty.

Cozify HAN Home Assistant HACS – from setup to proper integration

In my previous post, I showed how to connect Cozify HAN to Home Assistant via REST sensors and editing the configuration.yaml file. It works, but it requires hand-written YAML, and each new sensor had to be added manually. The feedback was clear: "It works, but couldn't this be done more easily?"

Now you can. Cozify has released an official Home Assistant integration for HAN, which can be installed via HACS in a few clicks. No YAML, no manual REST queries, no coding – just an IP address (and HACS installed) is enough.

What changed?

Previously, the user had to:

  • Understand REST API addresses and response format
  • Write each sensor separately to configuration.yaml
  • Take care of poll intervals and template parsing
  • Update the configuration manually if the API changed

The new integration takes care of all this automatically. You install the integration, enter the HAN IP address, and all the sensors appear in Home Assistant ready to go.

What do you get with integration?

All relevant data is directly available:

  • Real-time total power and phase-specific powers (L1, L2, L3)
  • Voltage and current for each phase separately
  • Reactive power (VAr) – especially important in industrial and B2B applications
  • More sensitive information about the HAN device settings, and even the electricity meter
  • Cumulative energy data – import and export directly to Home Assistant's Energy Dashboard
  • All sensors are automatically named and immediately available in automations, dashboards, and the Energy panel.

Installation – less than 5 minutes

Step 1: Install via HACS

    • Open Home Assistant and go to HACS → Integrations
    • Type "Cozify" and click search
    • Find "Cozify HAN" in the list and click Download
    • Restart Home Assistant

Step 2: Enable the integration

    • Go to Settings → Devices & services
    • Click Add integration
    • Search for "Cozify HAN"
    • Enter the IP address of Cozify HAN (e.g. 192.168.1.10) and click Submit

That's it. The sensors will appear automatically.

Real-time electricity price monitoring

The sensor.cozify_han_power_total sensor created by the integration allows you to calculate electricity costs in real time. I recommend using the Riemann sum integral sensor in Home Assistant, which converts the instantaneous price (c/h) into cumulative consumption (c). On top of this, the Utility Meter assistant tracks consumption on a daily, weekly and monthly basis.

Combined with spot price data (e.g. with Nordpool integration), you can build automation that controls loads based on price – and see the results directly in the Energy Dashboard.

Ready-made automation templates – Blueprints

The integration comes with ready-made Blueprint automation templates to get you started quickly:

    • Overcurrent warning: Alarms when the current of any phase exceeds the set limit. Import Blueprint: https://github.com/cozify/han-home-assistant/blob/main/blueprints/overcurrent_notification.yaml
    • Total Power Warning: Alerts when the total power exceeds the set limit. Import Blueprint: https://github.com/cozify/han-home-assistant/blob/main/blueprints/total_power_notification.yaml

Blueprints are imported into Home Assistant via Settings → Automation & scenes → Blueprints → Import Blueprint. Enter the address above and the template is ready to use.

Practical example: Overload protection with Shelly

In the previous blog I discussed the configuration.yaml-based implementation. Now the same can be done more neatly directly with the integration sensors. The basic idea is the same: when the current of a phase exceeds, for example, the 20 amp limit, the non-critical load is automatically disconnected.

Because the integration creates ready-made phase-specific current sensors (e.g. sensor.cozify_han_current_l1), automation can be built directly in the Home Assistant interface without YAML editing.

What about configuration.yaml – can it still be used?

Yes, you can. The REST API is not going anywhere, and the old configuration.yaml settings will still work. But the new integration is the recommended way: it's easier to install, updates automatically, and follows Home Assistant best practices for sensor registration.

If you already have a working YAML configuration, you can still move on to the integration. Remove the old REST sensors from configuration.yaml, install the integration, and verify that the automations reference the new entity names.

Checklist

    • HAN/P1 data is updated every 10 seconds – this is a limitation of the meter, not the integration.
    • WiFi coverage: If the electrical cabinet is metal, an external RP-SMA antenna or Ethernet connection may be recommended.
    • Star on GitHub: If you find the integration useful, please visit and give it a star in the repository at github.com/cozify/han-home-assistant. Stars are needed so that the integration can be included directly in the official Home Assistant integration portfolio in the future - without the HACS step.
    • Bugs and improvement ideas: This is a community-driven integration, and feedback guides development.

Thank you for reading!
Share your experiences and feedback at info@cozify.fi

 

Jukka Talja

Jukka Talja
Cozify, Head of Sales