Error in code with HomeSpan

Hi, I am trying to set up an basic led automation with homespan. But I keep getting this error:

In file included from c:\libraries\HomeSpan\src/HomeSpan.h:30,
from C:\Users\Gebruiker\OneDrive\Documenten\Arduino\HomeSpan_Led\HomeSpan_Led.ino:1:
c:\libraries\HomeSpan\src/version.h:47:4: error: #error ERROR: HOMESPAN REQUIRES VERSION 2 OF THE ARDUINO ESP32 LIBRARY. HOMESPAN IS NOT COMPATIBLE WITH VERSION 1 OR VERSION 3
47 | #error ERROR: HOMESPAN REQUIRES VERSION 2 OF THE ARDUINO ESP32 LIBRARY. HOMESPAN IS NOT COMPATIBLE WITH VERSION 1 OR VERSION 3
| ^~~~~
c:\libraries\HomeSpan\src/version.h:48:12: fatal error: FATAL_ERROR: No such file or directory
48 | #include <FATAL_ERROR>
| ^~~~~~~~~~~~~
compilation terminated.
exit status 1

Compilation error: exit status 1

Im following this tutoral: https://www.youtube.com/watch?v=K1xrCyN9T98
Has anyone else had this error? If so, how do I solve it.

Ps: Sorry if my english isn't very good

Sound like you need to downgrade t5he ESP32 board package to a (or the latest) 2.x version.

Use boards manager, select the ESP32 board package and select a 2.x version. Next click "update'.

It works now! thanks a lot!