HA und Arduino

Hello all,
I recently started running Home Assistant on an Intel NUC. However, under Proxmox and as a VM. But now I would like to have some GPIOs for some existing buttons. Therefore I had the idea to use an Arduino Nano for this. The same worked great with the Rasperry and pimatic. I had googled for it and unfortunately found very few results. E.g. this
Unfortunately not much more. With this tutorial I unfortunately do not get to the goal. my log shows me the following:

2022-09-12 19:02:22.101 ERROR (MainThread) [homeassistant.setup] Setup failed for serial: No setup or config entry setup function defined.

In the Configuration.yaml I currently have the following:

serial:
  port: /dev/serial/by-id/usb-FTDI_FT230X_Basic_UART_DM01BF47-if00-port0
  switch:
  - platform: serial
    serial_port: /dev/serial/by-id/usb-FTDI_FT230X_Basic_UART_DM01BF47-if00-port0
    switch:
    pins:
      1:
        name: arduino_pin_1

I had also tried other things, but I always get only error messages. Can someone help me?
Ingo

Translated with www.DeepL.com/Translator (free version)

Can’t you use an ESP?
They are super simpel to add to HA.

That would be a stopgap measure. In any case. With a Node MCU or Wemos you have some GPIOs. Thanks for the tip.
But basically I would prefer the Arduino solution.