Steps to reproduce
1.Place command block and observer block besides it. Make sure observer block detection part is in the command block.
2. Place a redstone wire in the output of observer block.
3. Open command block and close it.
As you can see, the observer is activated.