# `BB.Command.Disarm`
[🔗](https://github.com/beam-bots/bb/blob/main/lib/bb/command/disarm.ex#L5)

Standard command handler for disarming a robot.

When executed from the `:idle` state, this command disarms the robot
via `BB.Safety.Controller`, which calls all registered `BB.Safety.disarm/1`
callbacks to ensure hardware is made safe.

## Usage

Add to your robot's command definitions:

    commands do
      command :disarm do
        handler BB.Command.Disarm
        allowed_states [:idle]
      end
    end

Then execute:

    {:ok, cmd} = MyRobot.disarm()
    {:ok, :disarmed} = BB.Command.await(cmd)

---

*Consult [api-reference.md](api-reference.md) for complete listing*
