Manually edit integration-related files

Hello,

I’ve installed HomeAssistant on my raspi with the pip install method (this method: https://www.home-assistant.io/docs/installation/virtualenv/)

I have an Ubee router, so I’m wondering if I could use it as the device tracker. It seems like it is possible: There is an Ubee integration !

However, my Ubee model UBC1303BA00 is not compatible with the “pyubee” library this integration uses. Ok, I will edit the source and make it compatible: https://github.com/mzdrale/pyubee/pull/24

Now of course this change does not get merged instantly, and I guess it takes even longer for it to reach homeassistant…? I think that I found the pyubee lib from /srv/homeassistant/lib/python3.7/site-packages/, just like I would with normal pip installation of the library.

My question: Can I change the pyubee files locally in that dir, and what should I do after that to ensure that the changes take place in the homeassistant when I run it? I would really like to have my modem working also during the waiting time when my PR hopefully gets merged and the changes in the library gets merged to homeassistant.

You should be able to just modify the file and restart HA - I’ve done this in the past to diagnose and resolve issues. Obviously make a backup of the file so you can revert if things go awry.

Thanks, I tried to do that. However, it doesnt seem to recognize the new script, since now my config says

(MainThread) [homeassistant.components.homeassistant] Invalid config for [device_tracker.ubee]: not a valid value for dictionary value @ data['model']. Got 'UBC1303BA00'. (See ?, line ?)

Any ideas what’s wrong? It seems like there is some check done by homeassistant before the pyubee lib is actually used, but for god’s sake it’s hard to find where I can hardcode this new model to be accepted…

Now it works! I also had to edit /srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/ubee/device_tracker.py to include the new model for config parsing/checking. And a restart from the WebUI was not enough, I had to restart the homeassistant service via systemctl.

Cheers, it seems like it’s finally working!