Since you have a plastic box, an explicit ground wire connection is required. With a metallic box it's generally not, for switches, as they can ground by connection to the metal box, which should be connected to the ground wires.
The old fan switch has a ground connection. It's the green wire that's not connected to anything.
The new switch has a ground connection - it's the green-colored screw in the upper left, same as the old switch.
Those should be connected to (are required to be if you need that spelled out) the incoming ground wires from the cables. The two ground wires from the two cables appear to have been twisted and crimped, so you'll have to cut the crimp off to connect the additional ground wires to the two grounds from the cables by some other means (one of many reasons I hate those stupid crimps, and probably why whoever came before didn't bother to properly ground anything, though it doesn't say much for the inspector that should have failed it.) If I'm being mislead by the picture and it's a wirenut, just remove it, add wires, and use a larger size if the original no longer fits well with more wires.
I think there is an exception for switches with no user-facing conductive parts, but these clearly have metal parts on the user-facing side (at least in part to take advantage of grounding to metallic boxes...)