A functional device (10, 10', 10") comprising: - a constant current driver (12, 12') configured for providing a constant current by varying a drive voltage, wherein the constant current driver is connected to a current source, - an electrical energy storage unit (14, 14') for storing electrical energy, - a functional unit (16, 16') arranged for operating on the constant current provided by the constant current driver and current provided by the electrical energy storage unit (14, 14') and configured to receive the constant current from the constant current driver (12, 12') and the current from the electrical energy storage unit (14, 14'), and - a control unit configured for controlling a flow of the constant current to the electrical energy storage unit (14, 14') and to the functional unit, and the current from the electrical energy storage unit (14, 14') to one of the control unit or to the functional unit, - a electrical energy storage unit switching unit configured for connecting the electrical energy storage unit to a first common, - a functional unit switching unit configured for connecting the functional unit to a second common, wherein the control unit is configured to receive a control signal and generate a pulse width modulated voltage signal (42, 42', 42") based on the received control signal and generate a charging control signal and a dimming control signal based on the generated pulse width modulated voltage signal (42, 42', 42") for controlling the flow of the constant current such that the constant current is provided to the electrical energy storage unit (14, 14') by switching the electrical energy storage unit switching unit to connect the electrical energy storage to the first common based on the generated charging control signal in order to charge the electrical energy storage unit (14, 14') during at least a part of off periods (52, 52', 52") of the generated pulse width modulated voltage signal (42, 42', 42") and such that the constant current is provided to the functional unit by switching the functional unit switching unit to connect the functional unit to the second common based on the generated dimming control signal and no constant current is provided to the electrical energy storage unit (14, 14') during on periods (50, 50', 50") of the generated pulse width modulated voltage signal (42, 42', 42"); and the functional device being characterized in that the control unit is configured to control a charging rate of the electrical energy storage unit (14, 14') by regulating a deadband period (54, 54') between the on periods (50, 50', 50") of the generated pulse width modulated voltage signal (42, 42', 42") and the charging periods (60, 60', 60") during the at least part of the off periods (52, 52', 52") of the generated pulse width modulated voltage signal (42, 42', 42") in which the constant current is provided to the electrical energy storage unit (14, 14'), wherein in the deadband period both of the electrical energy storage unit switching unit and the functional unit switching unit are switched in order not to connect with the first and second common (30, 36).. - a constant current driver (12, 12') configured for providing a constant current by varying a drive voltage, wherein the constant current driver is connected to a current source, - an electrical energy storage unit (14, 14') for storing electrical energy, - a functional unit (16, 16') arranged for operating on the constant current provided by the constant current driver and current provided by the electrical energy storage unit (14, 14') and configured to receive the constant current from the constant current driver (12, 12') and the current from the electrical energy storage unit (14, 14'), and - a control unit configured for controlling a flow of the constant current to the electrical energy storage unit (14, 14') and to the functional unit, and the current from the electrical energy storage unit (14, 14') to one of the control unit or to the functional unit, - a electrical energy storage unit switching unit configured for connecting the electrical energy storage unit to a first common, - a functional unit switching unit configured for connecting the functional unit to a second common,