|
Home IO Control
ESPHome add-on for IO-Homecontrol devices
|
Status: Accepted · Recorded: 2026-08
Renaming a device, forcing it open, or asking it to identify itself are used rarely and per-device — typically once during setup or while troubleshooting, not as part of everyday operation.
Option 2. rename_device, identify_device, and force_open_device are registered as node-scoped native API actions.
All three share one data-driven descriptor class, parametrized by action name, argument list, and a callback that unpacks the request's string arguments. Adding a fourth action is a registration call, not a new class.
Results come back as an event rather than an entity state, so the triggering automation can inspect success and verification details without anything persistent existing to hold that state.
sequenceDiagram
participant HA as Home Assistant automation
participant API as ESPHome native API
participant MA as ManagementActions
participant EE as ExchangeEngine
participant Dev as IO-Homecontrol device
HA->>API: action: esphome.<node>_rename_device<br/>{device_id, new_name}
API->>MA: execute (via shared descriptor)
MA->>EE: authenticated SET_NAME exchange
EE->>Dev: command
Dev-->>EE: acknowledgement
MA->>EE: GET_NAME readback (verification)
EE->>Dev: command
Dev-->>EE: stored name
MA-->>HA: event: home_io_control_action_result<br/>{success, verified, …}
The component enables the required native-API compile-time flags internally, so user YAML needs only a normal api: block. Host unit tests must define those same flags, or the registration path compiles out and the action tests silently cover less than they appear to.