Relay switch with wrong state

hi,
i’m trying to setup a relay switch with this relay board ELEGOO Relay Module With Optocoupler

but whatever i do , the state is always inverted after a reboot

i tried all different mode for restore_mode option described on the doc but it’s always wrong.

i used this config

switch:
  - platform: gpio
    pin: GPIO16
    name: "esp relay 1"
    restore_mode: RESTORE_DEFAULT_ON

anyone have an idea how to debug this ?

Have you tried inverted: true?

hourah !

thanks a lot, inverted: true

solved the issue