Skip to content

Releases: jerrit/ha-base-power

v1.9.0

Choose a tag to compare

@jerrit jerrit released this 29 May 18:32
  • Add WiFi Network select entity — a dropdown on the Base Power device card lets you choose a preferred WiFi network directly from Home Assistant, with available networks populated from a live scan sorted by signal strength
  • Add WiFi SSID dropdown in options — the gear icon on the integration page now shows a live list of nearby networks with signal strength percentages instead of a plain text field; selecting "Auto (strongest signal)" clears the preference
  • Add battery unit count setting — configure the number of battery units (1–10) via the gear icon on the integration page, useful when auto-detection does not match your actual hardware

v1.8.0 — Dual-unit battery fix

Choose a tag to compare

@jerrit jerrit released this 25 May 20:41

What's fixed

2-unit (50 kWh) battery count detection — Users with two Base Power units were seeing battery count reported as 1 instead of 2, causing incorrect System Capacity (25 kWh instead of 50 kWh) and skewed backup time estimates.

Root cause

The MobileGetDashboardRoot API encodes each battery unit as a repeated Field 3 sub-message. The original parser only read the first occurrence. 2-unit systems have Field 3 appear twice — the second was silently ignored.

Fix

Battery count is now max(field3_occurrences, subfield1_value), correctly handling both API encoding styles without breaking 1-unit (25 kWh) installs.

Also in this release

  • Expanded protobuf debug logging: all previously-skipped top-level fields now logged with field number and value (debug level only)
  • Added test_battery_count.py diagnostic script for probing the raw API response

Upgrading

Reload the integration after updating — no reconfiguration needed.

v1.7.0

Choose a tag to compare

@jerrit jerrit released this 24 May 01:16

v1.7.0

  • Auto-discover Service Location ID — setup is now email + OTP only, no manual ID lookup required
  • Add Self-Sufficiency % sensor: (solar + battery) ÷ total home consumption
  • Add Total Home Energy sensor: grid + solar + battery kWh (Energy Dashboard compatible)
  • Add Battery Charging binary sensor: inferred from SoC delta between polls
  • Add Daily Average Grid Interval sensor (already fetched, now exposed)
  • Fix Solar Connected: falls back to solar_to_home_kwh > 0 when API field is unset
  • Fix Battery Backup Time: now a dynamic estimate from live SoC and average home load
  • Energy Dashboard: add suggested_display_precision to all energy sensors

v1.6.0

Choose a tag to compare

@jerrit jerrit released this 22 May 23:25

New/fixed sensors:

Battery Level — now shows real SoC% from GridStatus
Grid Power — current draw in amps from the latest 15-min grid reading
Daily Total (Grid) — total kWh from the grid status summary

V1.5.0

Choose a tag to compare

@jerrit jerrit released this 22 May 20:39

New Binary Sensors:

  • Grid Power (outage detection)

New Sensors:

  • Battery Status (enum: Installed, In Service, etc.)
  • Grid to Home Energy, Solar to Home Energy, Battery to Home Energy (all HA Energy Dashboard compatible)
  • WiFi Signal (%), WiFi SSID (diagnostic)
  • Bill Amount ($), Bill Due Date (diagnostic)
  • Asset ID (diagnostic)

Improved:

  • Battery Level now prefers real SoC from the GridStatus API when available, falling back to the self-calibration method

v1.4.0

Choose a tag to compare

@jerrit jerrit released this 22 May 20:18

ha-base-power v1.4.0

Fixes
Sensor state_class compatibility: Removed device_class=ENERGY from non-cumulative energy sensors (Current Interval, Daily Peak, Daily Low) that use state_class=measurement. This resolves Home Assistant warnings about incompatible state_class/device_class combinations.
has_solar false positive: No longer infers solar presence from an unidentified protobuf field. The binary sensor now correctly defaults to False until the actual field is identified.
battery_count mapping: Swapped protobuf field 1/2 interpretation — field 1 is now mapped to battery_count, field 2 to battery_status.
Added
Debug logging for raw DashboardRoot protobuf hex and sub-field values (enable with custom_components.base_power: debug in logger config) to help identify correct field mappings.

V1.3.0 New Auth Approach

Choose a tag to compare

@jerrit jerrit released this 22 May 19:23
feat: use native mobile API pattern (_is_native=1) for Clerk auth

- Add _is_native=1 query param to all Clerk API requests
- Add x-mobile: 1 header to mimic native Expo SDK behavior
- Remove cookie-based auth (credentials: omit like native SDK)
- Pass client JWT via Authorization header only (no __client cookie)
- Extract session_jwt from attempt_first_factor response if available
- Store session_jwt in config entry for immediate use on startup
- Bump version to 1.3.0

Based on reverse-engineering the Clerk Expo SDK source:
The native SDK appends _is_native=1, sets x-mobile header, and
passes the stored client JWT in Authorization header with no cookies.

v1.2.0

Choose a tag to compare

@jerrit jerrit released this 22 May 18:49

What's New
This release is a full rewrite of the integration with a working Clerk authentication flow and complete gRPC-Web API client.

Highlights
Authentication actually works — 3-step email OTP flow (email → verify code → select location) now correctly triggers the login email from Base Power
Full gRPC-Web protocol client — Direct protobuf encoding/decoding, no external gRPC dependencies
8 sensors — Battery level (%), backup time (hours), current power (W), current interval energy, daily peak, daily low, daily total, interval count
2 binary sensors — Solar connected, battery connectivity
Energy Dashboard compatible — Daily total uses total_increasing state class for HA Energy integration
Auto-refreshing JWT — Handles Clerk's 60-second token expiry transparently
HACS ready — Validated structure with CI workflow

Breaking Changes
Complete config entry replacement — you'll need to remove and re-add the integration
New config flow requires service location ID (found in the Base Power app)

Technical Details
Protocol: application/grpc-web+proto over HTTPS (Envoy proxy)
Polling: 5-minute intervals
Battery %: Derived from backup seconds calibration (49,652s = 100%)
Auth: Clerk email OTP → client token → JWT (60s lifetime, auto-refresh)

V1.1.0

Choose a tag to compare

@jerrit jerrit released this 22 May 16:41

What's new

Added Battery Backup Hours Remaining sensor — shows estimated backup time based on current battery charge and home load, updated every 5 minutes
Removed manual battery control actions (integration is read-only)
Added Base Power brand icon

v1.0.0 - Initial Release

Choose a tag to compare

@jerrit jerrit released this 22 May 01:50
Initial release: Base Power Home Assistant integration v1.0.0

Unofficial HACS integration that exposes Base Power home battery data
as Home Assistant entities via the Base Power gRPC-Web API.

- Full Clerk email OTP authentication flow with automatic JWT refresh
- DataUpdateCoordinator polling every 5 minutes
- 10 sensor entities (energy, power, battery status, grid flows)
- 5 binary sensor entities (grid connected, outage, solar, backup)
- 2 button entities (manual backup, overcurrent reset)
- Multi-step config flow with multi-location support and re-auth handling
- Zero external dependencies beyond aiohttp (manual protobuf encoding)
- HACS validation GitHub Action included

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>