Pi-hole automation in Homeassistant

Yeah, you'd need to query the blocking status sufficiently often to get this right. I think adding more and more complicated automation isn't going to be a good solution, better would be creating a Home Assistant integration like core/homeassistant/components/pi_hole at dev · home-assistant/core · GitHub but for Pi-hole v6. Using an integration is a lot easier as the interface would be cleaner but you could also write only a tiny little bit of Python code that ensures you always have a valid SID around and don't need to do the login/logout each time.

Sure, on a sufficiently "beefy" Pi-hole, login/logout is no issue, however, if you are using a low-end device, checking the password may take a noticeable (even if still small) delay. This is due to the much improved Balloon password algorithm making hacking your password practically impossible*.

*) On Pi-hole v5 and before, the algorithm was already impossible to reverse (a so called "one-way function") but the possibility to compute it in light speed makes it possible to brute force the password given sufficient compute power is available. While still not really feasible, it'd theoretically be possible. With v6, it is not practically possible any longer. No known quantum algorithms exist to solve this faster, either.

3 Likes