Ive used this command:
/execute @e[type=!Item] ~ ~ ~ detect ~ ~-1 ~ soul_sand 0 /effect @e[r=0] poison 2 2
When I stood on soul sand, I do get poisoned, but do not gain any damage. I only get damaged after i walk off the soul sand
Alternate steps to reproduce:
Place a repeating (needs redstone) command block with a lever ontop
Insert
/effect @p minecraft:poison 2 0
in the command block
Go to survival/adventure mode
Turn the lever on
You have the poison harts, but take no damage
Turn the lever off
You now take damage
Dupe of MC-87799