Detect different types of button press on esphome hardware input

Hello,
I would like to create a connected button using an ESP32 and a push button.
Does anyone know how I could differentiate different type of presses (long push, short push, mutliple push). I guess you could program this directly in esphome firmware but I don’t know how to do it.
Thanks in advance :slightly_smiling_face:

Excellent ! I should have dug deeper in the documents :slight_smile: