Arduino Port Expander i2c connection not recover after failure

Hello i am trying to use Arduino Port Expander in an application where reliability is really important .

As a test temporary I braked the i2c line between the port expander and the esp device. I got a following error immediately (which is good) :

[E][component:112]: Component <unknown> was marked as failed.

And never recovered (that is not good).

I wonder how can this made more robust? eg. after the transient is gone should recover by them self.

Thank you

there is a new proper component which is working fine GitHub - glmnet/esphome-components

One thing to point out pullup resistor need for binary sensor after restore might behave unstably.

With the new proper component without pullup resistor for me after the i2c connection is lost and return, or the Arduino board is restarted esp starting to send frenetically sensor on off in a loop :frowning: until i reboot the esp:

[D][binary_sensor:036]: 'Living PIR': Sending state ON
[D][binary_sensor:036]: 'Living PIR': Sending state OFF
[D][binary_sensor:036]: 'Living PIR': Sending state ON
[D][binary_sensor:036]: 'Living PIR': Sending state OFF
[D][binary_sensor:036]: 'Living PIR': Sending state ON
[D][binary_sensor:036]: 'Living PIR': Sending state OFF
[D][binary_sensor:036]: 'Living PIR': Sending state ON
………………………….

with pullup everything working fine