A controller (130, 530) for a power converter having an input adapted to receive an input voltage provided by a dimmer circuit, the power converter including a switch, the controller comprising: an edge detection circuit (136, 536) including: a first comparator configured to assert a first output signal in response to a voltage sense signal (142, 542) being greater than a first reference, wherein the voltage sense signal is representative of the input voltage of the power converter; a second comparator configured to assert a second output signal in response to a current sense signal (144, 544) being less than a second reference different from the first reference, wherein the current sense signal is representative of a current through the power converter; characterized in that: the edge detection circuit (136, 536) is a trailing edge detection circuit that further comprises a slope sense module configured to assert a slope signal in response to the voltage sense signal decreasing over time; and an edge driver circuit configured to generate an edge signal in response to assertions of the first output signal, the second output signal, the slope signal, and an enable signal received from a bleeder control circuit, wherein the enable signal is representative of when a bleeder circuit coupled to the input of the power converter is enabled; and a drive circuit (132, 532) configured to output a drive signal (170, 570) in response to the edge signal, wherein the drive signal is configured to control the switch so as to regulate an output of the power converter. an edge detection circuit (136, 536) including: a first comparator configured to assert a first output signal in response to a voltage sense signal (142, 542) being greater than a first reference, wherein the voltage sense signal is representative of the input voltage of the power converter; a second comparator configured to assert a second output signal in response to a current sense signal (144, 544) being less than a second reference different from the first reference, wherein the current sense signal is representative of a current through the power converter; a first comparator configured to assert a first output signal in response to a voltage sense signal (142, 542) being greater than a first reference, wherein the voltage sense signal is representative of the input voltage of the power converter; a second comparator configured to assert a second output signal in response to a current sense signal (144, 544) being less than a second reference different from the first reference, wherein the current sense signal is representative of a current through the power converter; the edge detection circuit (136, 536) is a trailing edge detection circuit that further comprises a slope sense module configured to assert a slope signal in response to the voltage sense signal decreasing over time; and an edge driver circuit configured to generate an edge signal in response to assertions of the first output signal, the second output signal, the slope signal, and an enable signal received from a bleeder control circuit, wherein the enable signal is representative of when a bleeder circuit coupled to the input of the power converter is enabled; and a drive circuit (132, 532) configured to output a drive signal (170, 570) in response to the edge signal, wherein the drive signal is configured to control the switch so as to regulate an output of the power converter.