Skip to content

v2.7.0 - Stable Home Assistant Entity IDs

Choose a tag to compare

@phurth phurth released this 19 Feb 18:48
· 13 commits to main since this release

WARNING: BREAKING CHANGE - ACTION REQUIRED BEFORE UPGRADING

You must remove the OneControl device from Home Assistant before installing this update.

After installing, the app will re-discover all OneControl entities with new, stable IDs. If you do not remove the old device first, you will have duplicate/ghost entities in HA that must be cleaned up manually.

How to upgrade cleanly

  1. In Home Assistant -> Settings -> Devices & Services -> MQTT, find your OneControl device and delete it.
  2. Install this APK update.
  3. The app will reconnect and re-publish all entity discoveries with the new stable IDs.
  4. All entities will reappear with friendly names populated immediately.

What changed

Bug fix: Entity IDs no longer change after a controller reset

Previously, Home Assistant entity IDs were derived from the OneControl controller's volatile device address table (e.g. light.light_0a09, sensor.tank_0311). These addresses are assigned by the controller at runtime and can shift whenever the controller resets, firmware updates, or devices are added/removed, causing HA entities to be duplicated or lost.

All entity IDs are now anchored to the hardware-stable functionName + functionInstance pair (e.g. light.light_fn00ac_i00, sensor.tank_fn0401_i02), which is a property of the physical device and never changes.

Affected entity types

  • Lights (dimmable, RGB)
  • Switches
  • Covers / slides / awnings (state sensors)
  • Climate zones
  • Binary sensors
  • Tank level sensors
  • Generator state, battery, temperature sensors
  • Generator quiet hours, switch
  • Runtime hours sensors

Technical details

  • Added FunctionKey(functionName, functionInstance) as the internal stable semantic key
  • All HA unique_id and object_id values now use the fn%04x_i%02x format
  • Added getSensorDiscoveryByFunction() for sensor entities (tanks, generator sub-sensors)
  • addrToFunctionKey reverse-lookup rebuilt on each metadata response, so BLE wire-protocol address changes are transparent to HA
  • Friendly names populate immediately on first connect (no deferred republish delay)