Light Switch Wiring Question

I bought this Leviton LTB60-1LZ timer for our shower light since my wife keeps forgetting to turn it off. When I took it out of the box I noticed it had 5 wires. White, Black and green as expected, and a yellow and red wire. The red wire is for 3-way and the yellow wire is for a load. I just want it to replace a light switch, not a fan. Here is where I am at. I connected the black, white and ground and it appears to work, but the shower light isn’t energized when it should be. I assume that’s because I haven’t hooked up the yellow wire somewhere (this isn’t a 3-way setup). Is this the wrong switch for a light, as opposed to a fan? Which one should I have used instead? Is there a way to make this work?

Here’s my take on it.

Black is for your hot wire - power from breaker box
White is neutral from breaker - this may not be connected to your existing device but there should be a white wire in the switchbox is somewhere unless your dwelling is really old.
Red is the load wire -the wire coming in from your shower light.
Green is ground
Yellow is the 3 way “traveler”, not used

I think you have red and yellow swapped. Instruction sheet is below

What ddI you have before you took out the switch? Depending on how it’s hooked up, it may or may not work. If you have a switch loop where the power goes to the light and then the switch, you may not have a neutral.

Assuming there are two cables in the box, one power in and one out to the light:

[li]Connect all grounds/green[/li][li]Connect all neutrals/white[/li][li]Connect black to power in black (hot)[/li][li]Connect yellow to black to the light[/li][/ul]

Just cap off the red and tuck it in the back. Note: you may have mixed up red and yellow in your description, swap as appropriate.

Thanks everyone, ignorance fought.

For me it is just a little hard to be sure of what you have there for wires. Here is my SWAG.

The switch you removed should of had 3 wires. A hot, black. A bare wire, ground. And another wire probably black, lead to the load.

The black hot lead should go to the switch black wire.
The black load lead should go to the switch yellow wire.
The bare wire should go to the switch green wire.
Remove the wire nut from the white leads and connect the witch switch to the white wires and put wire nut back on.
Cap the switch red wire.

To me it looks like you have the switch white wire connected to the load wire coming from the light.

I may be wrong and miss interpreting the picture.

(Most) Electronic controls like this require a neutral for a return path for the small amount of power the device itself needs even when the load is off. A normal switch doesn’t need one and under older codes one might not even be provided in the box.

it’s hard to tell, but I’d agree that the neutral wire (white) for the switch is hooked up to the load wire. The indicator lights on the switch light up and switch appears to time because it’s getting power for itself by bleeding power through the shower light as a return path but it’s not actually controlling anything because the load wire is dangling. (If you would unscrew the bulb the switch will go dead because you’re cut the return path it found). It looks like there’s a neutral available in this box it’s the bundle of white wires with the white wirenut. That’s where they white wire needs to go and the yellow wire goes to the wire leading to the light.

I did something similar, except it was a timer for the bathroom exhaust fan. Thus, the fan can continue running after I’ve left the bathroom and it will turn itself off after all the moist air has been removed. In my case I used a mechanical timer that you start by twisting the knob. Probably cheaper than the digital timer DolphinBoy used. Also simpler to install.