I need to use a command block to activate a lever in Bedrock edition. I thought I could use /setblock but the syntax for Bedrock edition doesn't seem to support it:

/setblock <position> <tileName> [tileData] [replace¦destroy¦keep]

I ran into a similar issue with trying to set the state of a redstone lamp recently and discovered that we've been provided with a lit redstone lamp object to use instead. However, no such variant exists for the lever:

Object list for lever in the command suggestions.

How can I activate a lever with a command block in Bedrock edition?

3 Answers 3


As per on the wiki,

enter image description here

You'll want to:

/setblock ~ ~ ~ lever ["open_bit":1,"lever_direction":"north"] replace

(Don't actually /setblock ~ ~ ~ unless you want to replace your command block)

/setblock is supported on Bedrock, but some block have rejigged states and syntax and some commands changed.

Also, you'll need to know which direction your lever is facing.

  • Thankfully my design was able to be completed with a redstone comparator instead, but I left my question up to help future readers. Thanks for the answer! Jun 17, 2021 at 1:52

While I type this, Bedrock Edition is still utilizing the data value.

Using the official Wiki, just add 8 to the data value to make an unpowered one powered, and just subtract 8 to make it unpowered (for /setblock and the like).

Source: Minecraft Wiki


In Bedrock inactive levers have id's 0-8 whereas active levers have id's 9-15

/fill 0 0 0 10 10 10 lever 11 replace lever

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .