First, make sure you understand, generally, how the trigger functions.
One detail of numeric state triggers using an entity to define above or below that many new users misunderstand is how each entity affects the function of the trigger. In your example, only changes to the Sonoff sensor will ever cause the trigger to fire. The other sensor changing to a value below the Sonoff’s, will not trigger the automation.
If that is what you need, a Template trigger is a better fit: