Whirlpool clothes washer

My Whirlpool top loading HE washer won’t go through cycles. It fills then drains without washing. Then the "wash" lite comes on and the lid unlocks. If I put it on "rinse and spin," it fills, drains without rinsing. When it is done draining the "wash" lite comes on and the lid unlocks. If I put it on "drain and spin" it drains, spins and the "done" lite comes on and the lid unlocks. If anyone has an idea as to what the cause could be I would appreciate hearing it. Thanks in advance. Tom