Skip to content

v0.3.0

Latest

Choose a tag to compare

@Yimura Yimura released this 07 Jul 23:37

Replaces the withdrawn v0.2.0/v0.2.1/v0.2.2 tags.

What's new

FlowBuddy communicator as a first-class HA device
The on-site gateway box (e.g. Lewiz XMXCTA...) now shows up in the HA Devices UI as its own device row with:

  • sw_version: firmware from firmWareVersion (e.g. XMX_EMSA_V0.8.4)
  • serial_number: logicalDeviceName
  • model: type.name (e.g. Lewiz)
  • via_device: linked upward to the installation

Registered eagerly at setup — populated in the UI as soon as discovery finishes, independent of any entity attachment.

Installation device registered eagerly
Prior to v0.3.0 the installation device was created lazily via whichever entity attached to installation_device_info first. On installs with no open alarms and the connection-test button moved off installation, the via_device chain dangled — helpers/frame.py:348 warning; hard fail in HA 2025.12. Fixed by registering the installation device via device_registry.async_get_or_create before the communicator loop.

Meter serial_number DeviceInfo field
The vendor-supplied serialNumber now lands on DeviceInfo.serial_number (proper HA field shown in the Devices header slot) instead of only embedded in the device name fallback.

RequestConnectionTestButton attachment + unique_id
Two related fixes:

  1. device_info points at the communicator device (not the installation).
  2. unique_id fallback chain extended (idexternal_idlogical_device_name → synthetic) so it no longer ends in :None:connection_test.

Targeted display-name override for E_gen_pv
Vendor emits mt.name='Reverse Active Energy' (OBIS/IEC-62053 register terminology) for a measurement whose mt.code='E_gen_pv' = PV generation. On the PV sub-meter this is cumulative PV production kWh, but the OBIS name reads to most users like grid-export from the utility meter. discovery.describe now renames the display name to EMS PV energy. entity_id, device_class, state_class, and native_unit_of_measurement are unchanged — only the friendly name.

Extended diagnostics dump
Download diagnostics from the config entry menu now includes meters, measurements (with measurement_type unit/code/name/is_incremental), and communicators. Enables debugging sensor detection issues without live-editing the integration.

What was withdrawn

v0.2.0 shipped a FlowBuddyIntegratedEnergySensor (Riemann integrator) to derive PV kWh from PV power. Diagnostic dump against a live tenant showed the vendor already exposes cumulative PV kWh as mt.code='E_gen_pv' on the PV sub-meter — the integrator was solving a problem that didn't exist. Peer-check correctly suppressed it on the live tenant; the code has been removed to reduce surface area.

v0.2.1 fixed the dangling via_device. v0.2.2 shipped the extended diagnostics dump that surfaced the Riemann premise as wrong. Both improvements are included in v0.3.0; the intermediate tags/releases have been withdrawn.

Migration

  • Existing installs may see an orphaned button.flowbuddy_<inst>_request_connection_test entity (the old :None: unique_id). Delete it from the HA registry after upgrading.
  • The Reverse Active Energy sensor's friendly name updates to EMS PV energy on next reload; entity_id stays the same, so automations/dashboards keep working.
  • Configure the HA Energy dashboard with:
    • Grid consumption: sensor.meter_10310302_ems_grid_consumption
    • Return to grid: sensor.meter_10310302_ems_grid_injection
    • Solar production: sensor.meter_10310302_reverse_active_energy (now shown as "EMS PV energy")
    • Battery in: sensor.meter_10310302_ems_bat_charge_energy
    • Battery out: sensor.meter_10310302_ems_bat_discharge_energy

Follow-ups

Vendor-source cumulative-kWh via /aggregation{month,year}values and /measurementvalues remains tracked as issue #8 — potentially useful for historical backfill / long-term-statistics but no longer needed for the Energy dashboard baseline.

127 tests passing, 91% coverage, ruff + mypy strict green.