Dehumidifier compressor not turning on...

Hi. My dehumidifier was working fine unitl a few weeks ago when the compressor (I hope that is the right term …or is it condenser?) would fail to turn on once I placed the bucket back in place after emptying.

Eventually, I would have to turn the unit off and then after a while turn it back on. The compressor would then kick in and it would run fine and the bucket would fill with water. Sometimes, it would shut off after the bucket was halfway filled.

Finally, the compressor would not kick on at all. The compressor would attempt to turn on but not …and only the fan would be going.

Any suggestions would be appreciated. Is it time to toss and buy a new unit?

Thanks.

Sean

I was looking in the parts list and found a micro switch that is attached to a plastic housing. I know these carry a big load and fail frequently:
Replacement parts for WHIRLPOOL AD50LBK0 | AppliancePartsPros.com
part 13