set_port_speed
Set fan or dimmer speed (1-10) on a specific port of an AC Infinity controller. Use dry_run to preview changes before applying.
Instructions
Set fan or dimmer speed on a specific port.
Uses read-before-write: reads current mode settings then overlays the new speed value. Defaults to dry_run=True — set dry_run=False to write to the device.
Args: device_id: Device code from discover_devices (e.g. "C58ZA"). port: 1-based port number. speed: Target speed 1–10 (10 = full speed). dry_run: If True (default), returns the payload that would be sent without writing. Set to False to execute the change.
Returns: JSON with action, device_id, port, speed, dry_run, controller_type, sent, and payload (when dry_run=True).
When the port is in OFF mode (atType=0 or atType=1) at call time, the
response also includes a ``warning`` field telling the grower to ask
Claude to switch the port to ON mode to activate it. The speed is stored
on the controller but the port will not run until the mode is changed.
Example (dry_run=True)::
{
"action": "set Exhaust Fan (Port 2) speed to 5",
"device_id": "C58ZA",
"port": 2,
"speed": 5,
"dry_run": true,
"controller_type": "legacy",
"sent": false,
"payload": { ... }
}
On failure returns ``{"error": "..."}``.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device_id | Yes | ||
| port | Yes | ||
| speed | Yes | ||
| dry_run | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |