Skip to content

Add control entities (number/switch/select) for writable BLE properties #67

Description

@JonGilmore

Summary

Today the integration is read-only — sensors observe state, but users can't set anything from Home Assistant. APK reverse-engineering of the official Sub-Zero Android app (v4.5.1) confirmed that the BLE protocol exposes a set command with a known list of writable properties. We can add HA control entities (number, switch, select) that send set commands over the existing D5 channel.

Confirmed writable properties

Format: {"cmd":"set","params":{"<field>":<value>}}\n (terminator newline like all other commands). Validated against the APK strings + property names.

Refrigerator

  • ref_set_temp — number (°F, range from APK's minSetTemp/maxSetTemp validators — TBD per model)
  • frz_set_temp — number (°F)
  • ref2_set_temp — number (°F, fridge drawer)
  • wine_set_temp — number (°F)
  • wine2_set_temp — number (°F, second wine zone)
  • crisp_set_temp — number (°F, crisper drawer)
  • ice_maker_on — switch
  • sabbath_on — switch

Range / Wall Oven

  • cav_set_temp — number (°F, oven setpoint)
  • cav_cook_mode — select (numeric enum; specific values empirical — see Empirically map cav_cook_mode integer enum to named cooking modes #68 for cook_mode capture)
  • cav_unit_on — switch
  • cav_probe_set_temp — number (°F, food probe)
  • cav2_set_temp — number (°F, second oven)
  • cav2_cook_mode — select
  • cav2_unit_on — switch
  • cav2_probe_set_temp — number (°F)

Dishwasher

The APK confirms set exists for dishwashers but the writable properties weren't extracted in this pass. Worth a separate empirical capture if we want dishwasher control.

Implementation sketch

Add per-appliance number/switch/select entities in subzero_fridge.yaml / subzero_range.yaml (and optionally subzero_dishwasher.yaml). Each entity's set_value/turn_on/turn_off action writes the appropriate JSON command via esp_ble_gattc_write_char to the D5 handle, similar to the existing Submit PIN & Unlock button. Visibility gated by the existing hide_* substitutions.

Wrap each set write in a check for client->connected() and d5_handle != 0. On fw 8.5, also probably worth re-running subscribe before the set if first_poll_done has been a while (or just rely on the existing recovery ladder to pick up the failure).

Out of scope for this issue

References

  • APK research findings: docs/ble-protocol.adoc § "Unlock Session Research (fw 8.5)"
  • Confirmed property list cross-referenced with the standalone HA integration's models.py

🤖 Generated from APK reverse-engineering session, captured for follow-up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions