As you are using a Neutral, the ‘switch’ input will see 127V above neutral. The supply also has 127V above neutral (the phase will be slightly out on one of them but will be below 240V so it shouldn’t be an issue).
Three things you need to be careful of
- Although it will work it’s bad practice to have the ‘switch’ and ‘power’ circuits coming from different MCBs. In the UK it wouldn’t be allowed so
- Ensure that there is a means of isolating (and locking off) both phases if work needs to be carried out. The ‘switch’ circuit would still be live when the Sonoff is isolated.
- Make sure there is no possibility of the wires being misconnected.
You would be better using a second Sonoff on the switch circuit in master/slave