Quantcast
Channel: ESPHome - Home Assistant Community
Viewing all articles
Browse latest Browse all 1486

ESPhome switch invert to Home Assistant

$
0
0

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.

4 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 1486

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>