create_advance_automation
Define an advanced automation on an AC Infinity device: set fan speed, port, and schedule. Preview with dry run before sending.
Instructions
Create a new Advance Automation on a device.
Defaults to dry_run=True for safety. Set dry_run=False to send the automation to the device. The port bitmask (grouptDevType) is computed automatically from the port number (Port N → 2^(N-1)).
Args: device_id: The AC Infinity device code (from discover_devices). name: Automation name (max 64 chars, control chars stripped). on_speed: Fan speed when automation is active (1–10). port: 1-based port number the automation should control (1–8). off_speed: Not used — On mode relies on the port's own minimum speed setting. Parameter accepted for compatibility but not sent to the device. begin_time: Schedule start in minutes since midnight (0–1439, or 255=always active). Default: 0 (midnight). Use 255 for "always active" (runs 00:00–23:59 every day). end_time: Schedule end in minutes since midnight (0–1439, or 255=always active). Default: 1439 (23:59). Use 255 for "always active". dry_run: If True (default), previews the automation without sending it. Set to False to create the automation on the device.
Returns:
JSON with action, name, port, port_name, on_speed, min_speed (the port's
configured minimum speed — used when the automation is inactive), begin_time,
end_time, schedule_summary, dry_run, sent. Live responses also include
automation_id (for programmatic chaining — do not surface to the user; use
name instead). On failure returns {"error": "..."}.
When the specified port does not exist on the device, returns
{"error": "Port N not found on device X", "available_ports": [{"port": N,
"name": "..."}], "suggested_reply": "..."}. Port names absent or empty in
the API response fall back to "Port N"; control chars are sanitized.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device_id | Yes | ||
| name | Yes | ||
| on_speed | Yes | ||
| port | Yes | ||
| off_speed | No | ||
| begin_time | No | ||
| end_time | No | ||
| dry_run | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |