Flashing 3rd party through OTA is not supported officially. It was a bug instead of a feature before firmware v1.6, and the bug was fix since firmware v2.0. As a result, downgrading the firmware is not available as well. Please kindly note that downgrading the firmware/flashing 3rd party through OTA can cause unexpected malfunction of the device, and in this case we won't provide after-sale support and the consequences are users' responsibility.
And we don't give any option suggestion for integration of Sonoff to third party Home Automation systems