Sorry for reviving an 18mo thread, but... I just received my Moto G5 Plus today, and to my surprise, the official position of Motorola/Lenovo is "It works only with Chromecast". That don't fly with me. So, I applied the two lines to the build.prop file as described above, and lo-and-behold, my Roku TLC TVs showed up just fine.
However, when I select them, I get a prompt telling me that Wifi is active and must be turned off. After accepting, the MG5 connects directly to the TV, excluding the wifi connection to my router. That means, it rolls over to LTE service.
Is there any fix to this? It's certainly better than no screen casting, and will work just fine when trying to show local phone content - but since I'm on a capped data plan, it would really suck to be casting YT videos in a home with 100mbps WIFI, and still be forced to use VZ LTE to show it.