I need help with my configuration.yaml switches

Im trying to make my code for some switches to be inverted from the others

# Loads default set of integrations. Do not remove.
default_config:

# Text to speech
tts:
  - platform: google_translate


automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml


# Full configuration.yaml entry
# Example configuration.yaml entry
switch:
  - platform: rpi_gpio
    switches:
      - port: 16
        name: "Controles"
        unique_id: "Controles"

      - port: 24
        name: "Abanicos"
        unique_id: "Abanicos" 
        invert_logic: true

      - port: 25
        name: "Area de Trabajo"
        unique_id: "Area_de_trabajo"

      - port: 12
        name: "Laboratorio"
        unique_id: "Labora"

      - port: 26
        name: "Puerta"
        unique_id: "Puerta"

      - port: 23
        name: "Closed"
        unique_id: "Closed"

this is my right now codes, the first two (Controles and Abanicos) Are working great but the others are inverted, i tried putting a inverted at the end two but it keeps doing the same, when i turn it on it turns off

Can some one help pls? i’m really needing it right now

I’m confused- but what’s new about that?

To the best of my knowledge, rpi_gpio is depreciated. But I don’t use the Raspberry Pi, so what do I know?
This may help.

Since my switches are all ESPHome devices (or Z-Wave), I don’t use the switch: component in my configuration.yaml file.

Its posible using the rpi_gpio by hacs but right now im having a problem with my switches because the ones that are supossed to be inverted are working great but then all the other ones are inverted too, i tried to make a separation by doing this

# Loads default set of integrations. Do not remove.
default_config:

# Text to speech
tts:
  - platform: google_translate


automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
switch: !include switch.yaml
switches: !include switches.yaml

by making two separate files and in one putting the one i want to be inverted and the other ones to be normal