you can use PCF8574 to extend, such as add KinCony DO8 or DI8 i2c extender module, this can use for home assistant by ESPHome, if you want to use Tuya , also can config in yaml file, we have a video tour. But "kcs" firmware not support extend GPIO to use.
YouTube: https://www.youtube.com/c/KinCony
Online Store: https://shop.kincony.com
Alibaba Store: https://kincony.en.alibaba.com/
Online Store: https://shop.kincony.com
Alibaba Store: https://kincony.en.alibaba.com/

