Skip to content

set_radio_channel

Set the channel and/or channel width of one radio on an AP.

Side effects:

  • The radio retunes immediately; wireless clients on that band briefly disconnect and re-associate.
  • On 5GHz, DFS channels (52-144) may add a radar-scan delay before the radio starts serving clients.
  • Only the targeted radio changes; everything else on the device is read first and written back unchanged.
  • Mutates controller state. Use dry_run=True to preview the change (including the current value) without applying.

Read first: call get_device_radios to see the current channel and width.

set_radio_channel(device_mac="aa:bb:cc:00:00:02", band="5g", channel="36", width_mhz=80)
ParameterTypeRequiredDefaultDescription
device_macstringyesAP MAC address (from list_devices).
bandstringyes"2g", "5g", or "6g" (raw UniFi ids ng, na, 6e also accepted).
channelstringno"""auto" or a channel number as a string (e.g. "36"). Empty (default) leaves the channel unchanged.
width_mhzintegerno0Channel width: 20, 40, 80, 160, 240, or 320. 0 (default) leaves the width unchanged.
controllerstringno”default”Name of the UniFi controller to target. Defaults to "default".
dry_runbooleannofalsePreview the change without applying it. Returns the predicted change set.