Timer function in socket card

Fairly new to home assistant but I’ve been trying to recreate a timer function in socket/plug cards with no luck. I’m trying to recreate what the socket/plug looks like/functions in the tuya app