Be sure that the power is off to the circuit that you are working on. These were the only wires in the ceiling and attached.
How Does A Light Switch Work
Light is on but switch is off. In order for the light to work with the switch the ceiling light needs to be connected to the switched leg conductor coming off of the switch. You can test the switch with a voltage tester to determine which is the problem. Is this down to induced voltages and a duff low. If a light switch wont turn off it could be because its miswired or just a bad switch. Check the connections at the switch and make sure that they are tight. If you have concerns about these connections you may want to.
Had a call out today to a light pulsing on and off dim every couple of seconds and the switch is in the off position its a standard pendant fitting low energy lamp and standard 1g1w switch no dimmer i measured 14v across the switched live. Also a three way light may always have power in the box depending on switch layout. Very common a big misconception with deadly results. If the light is off no power there a very standard configuration is power to the light then a switch leg to the switch. 3 the reason the light remains on is that the light is permanently connected to another hot wire in the ceiling. With the power shut off check the wire connections at the light fixture and at the breaker panel to make sure they are all connected tightly.
Connect the white wire with the white wire on the fixture and cap off. Cnet if youre trying to pinpoint which appliance is causing flickering start by powering. If the switch is bad you should replace it because you cant fix it. Turn off the power to any switch or fixture at the circuit breaker before beginning any electrical work. Connect the black wire with the black wire on the fixture and cap off. If the switch is miswired its easy to rewire.