There are a number of options for using Sonoff Devices as light switches, including purpose built ones like the T1/2/3 Series
Sonoff T1/T2/T3
Sonoff Basic
Sonoff Dual
Automations and Templates
Using With Sonoff Basic