Automate Arduino Switch

Hi there

I’m learning how to use Home Assistant. As a first idea I want to automate the Arduino switch based on the random sensor. To test my setup, I installed some LEDs as my ‘lights’.
The switch works when I use the gui (I can turn the LED on and off). The automation, however, is not working. I could not find an example of such an automation of an Arduino switch. I adapted the example automation that creates a notification if the random sensor is above 10. I get the notification, so automation works, but the LED (‘pin 8, Fan Office’) is not flashing.

Here are (parts of) my .yaml files:

my automation:

  platform: numeric_state
  entity_id: sensor.random_sensor
  above: 10
  service: switch.turn_on
  entity_id: switch.arduino     

part of configuration.yaml:

  platform: arduino
      name: Fan Office
      name: Light Desk
      initial: true
      negate: true

group: !include groups.yaml
automation: !include_dir_list automation
script: !include scripts.yaml

I assume I set the entity ID wrong in the automation, but what’s the correct way?
Thanks for any help!