How can I prevent mobile data usage when connected to WiFi?

A

AC Question

My previous phone (android 4.3) just did not use mobile data when it was connected to a WiFi network. If the WiFi network was not connected to the internet (or some network login was required before it was allowed to access internet content), the phone simply could not access any internet content.

When I have my new phone (android 7.1.1) connected to a WiFi network I still expect no usage of the mobile data. Allas, if the WiFi network has no internet connection, the phone continues the usage of mobile data without warning. Now half of my bundle is consumed due to this behavior.

Is there any setting that prevents usage of mobile data as long as the phone is connected to a wireless network?