Avoid Pihole intervention on a device

Does this help?

Another option, if you can set the DNS on the home automation gateway, is to simply not use Pi-hole on that device and instead configure it to use an external DNS server, such as Quad9.