Current sensing sensor

Hi all
This might be a very particular requirement but I hope Sonoff make a sensor that can detect current flowing in a wire and have programmable thresholds that can trigger yes/no signals into our smart system for triggering scenes etc.
This would work really well for solar systems and automating transfer switches.
Michael