The effects themselves work only if you stand on the blocks, and the effects can be completely different. The main thing is to make a filklock, here is the guide from me:
How to make a filklock
So, let’s start and finish the command. At the place where the redstone block appears and disappears and we put the command unit and write:
[h2]/execute @p ~ ~ ~ detect ~ ~ – 0.1 ~ [block of the block] [type of block (affects the color of wool, clay, etc.D.,If not, then you go 0) effect @p [ID effect] [action time] [Effect level]
Then we test: I took the burned clay of black color, and the effect of blindness for 3 seconds of the first level.
As you can see, everything works. But why is the effect given for two seconds, and not three? I don’t know myself, just put 1 second more time, and everything will be as you wanted.
I hope this guide was useful for you.