Switching the operating state on machines is probably the simpler way to reduce the energy consumption of otherwise non energy-aware devices. Indeed, many energy-aware systems allow two states of operation: a low power idle (LPI) mode, in which the system is unable to process data, and a fully working mode. For networking equipment, packet coalescing is the best known algorithm for managing the LPI mode and has been proved able to get power savings nearing theoretical limits at the expense of packet delay when properly tuned. However, in real networks with non stationary traffic conditions, static tuning induces higher than necessary delays. In this paper we present the first dynamic algorithm that adapts packet coalescing configuration parameters to the real time traffic characteristics. Simulation results show that our algorithm is capable of achieving a given target energy efficiency while keeping packet delay as low as possible.