Skip to content

block_client

Block a client by MAC so it cannot rejoin until unblocked.

Side effects:

  • Adds the MAC to the controller’s user-block list. The client is immediately disconnected and prevented from re-associating on any SSID until unblock_client is called.
  • Mutates controller state. Use dry_run=True to preview the change without applying.
block_client(mac="aa:bb:cc:00:00:01")
ParameterTypeRequiredDefaultDescription
macstringyesClient MAC address (e.g. "aa:bb:cc:00:00:01").
controllerstringno”default”Name of the UniFi controller to target. Defaults to "default".
dry_runbooleannofalsePreview the change without applying it. Returns the predicted change set.