ESPhome switch invert to Home Assistant

I have an 8 relay board I am using to power multiple plugs and I want to invert the state to Home Assistant. I thought adding inverted: yes to the ESPHome side would invert the state sent to HA, but it seems HA is not reflecting the inverted state but the raw toggle. Is there an easy way to do this without making a binary sensor to control the invert?

switch:
  - platform: gpio
    name: "Biocube AC Relay 1"
    pin: 17
    inverted: yes
    restore_mode: RESTORE_DEFAULT_OFF

State change:
[D][switch:029]: ‘Biocube AC Relay 1’ Toggling ON.e
[D][switch:045]: ‘Biocube AC Relay 1’: Sending state OFFe

Home Assistant then does not reflect the state but more the relay toggle position and shows ON for the state of the sensor.

Here I have relay 1 setup normal (On is On and Off is Off) and then I have relay 2 as inverted as another test. I have restart HA, removed and re-added the ESPhome module but nothing seems to work to update the state to match what I need (Relay Off is On, Relay On is Off).

Setting inverted to true means that turning the switch on will output 0v on the gpio. Turning the switch off will output 3.3v.

So if that is the case I want to not use inverted on the ESPHome side since I’m using a normally closed side of the relay. I only want the relay energized in the few occasions I want to kill power to the socket.

So would I need to use a customize or template to invert this in HA to logically reflect an on and off state for the device plugged in?

Yes silly mistake. Once I removed the inverted flag the relay flipped back and the states matched up as expected. I think I was looking at this way too long in all the testing and changes.

Thanks!