1. A lighting device, comprising:a light source configured to be driven by electrical power;
a power interface for energy transfer with an external electrically driven device that can be is connected to the power interface;
an energy-storage unit configured to receive electrical power via the power interface, to store the received electrical power as electrical energy, and to deliver the stored electrical energy to the light source as the electrical power, and to allow, when the external electrically driven device is connected to the power interface such that the power interface is in a connected state, an energy-transfer operation between the energy-storage unit and an external second energy-storage unit of the external electrically driven device in a controllable energy-transfer direction via the power interface; and
a control unit configured to:
determine if the power interface is in the connected state;
determine a current light-output state of the lighting device; wherein the current light-output state of the lighting device is an operational state of the light source of the lighting device; and
control, in the connected state, the energy-transfer direction of the energy-transfer operation in dependence on the current light-output state of the lighting device.