DESIRED → APPLIED
POST Device commands & ACK
HomeAutoPro records requested state separately from device-confirmed state.
Send a command
POST /api/devices/{device_id}/state validates every key against the device template, creates a command ID and dispatches it when the device is online.
{"state":{"power":true,"brightness":50}}Acknowledge applied state
The device receives {"event":"command","command_id":"…","state":{…}}, applies supported outputs and publishes {"type":"state","state":{…}}. HomeAutoPro matches the report to the command and emits command_ack.