[Solved] Rpi 3 + Miflora plant sensor: gattool not found

Got it working! It’s basically the same issue I had with my nmap tracker in my virtualenv installation.

To get the sensor working and gatttool executed successfully just edit this file:
/srv/homeassistant/lib/python3.4/site-packages/miflora/miflora_poller.py
and add full path to gatttool (/usr/bin/gatttool) in the functions def write_ble in line 47 and def read_ble in line 106 for example:

while attempt <= retries:
   cmd = "/usr/bin/gatttool --device={} --char-read -a {} --adapter={}".format(mac, handle, adapter)

I’d also point to these useful debugging commands that helped a lot while troubleshooting the mi flora plant sensor:

Final Question:

I basically don’t understand why my virtualenv constantly needs full path for components involving the shell. I’ve installed Homeassistant according to the installation instructions but with every update I have to readd the full path to the corresponding files. It is a little annoying. Can anyone help me out with this? Is there something wrong with my virtualenv?