Having a new Oppo Find X9 Ultra with a huge battery I was somewhat surprised that just being on Wi-Fi overnight drained 7% of it with the phone sat doing nothing.
A lot of diagnostics later and the culprit is the Google Home App. When this is open and running, it constantly pings out to other cast devices on the network, it never stops. Every few seconds it goes around them all again saying a 'hello are you still there'. Then it seems to update Google cloud servers the latest result of hellos, to then repeat this a few seconds later. This causes unnecessary battery drain. In my case 7% of the battery drained overnight, with force closing Google Home, battery drain over night was just 1-2%. Of course this extra drain carries on during the day if staying at home on the same Wi-Fi.
Note that force closing the app isn't a permanent answer, as using Google smart speakers for alarms or alerts can see a notification sent to a phone which causes the Google Home app to load up.
I've repeated this behavior and can see in real time the packets going to and from my TV, amplifier and speaker all of which can be casted to, carrying on for hours with the phone screen off and not being used. As soon as the app is force closed on the phone it all goes quiet, replicated on two different devices.
Some phones may be more aggressive at closing down background apps, so not everyone will experience this, but certainly on two phones from different manufacturers, the app remained active for hours just chattery away over the network.
No idea how I get Google to look at this bug.
So if you find you are losing a lot of battery overnight, try force closing Google Home App, or see what battery saving options you can set against it.