Quick way to recompile a component without setting up a full development environment

Hello,

Is there a quick way to recompile a component without having to setting up a full development environment ?
I am working with a production homeassitant installed through Hassbian. After having done some updates on it, I want to recompile a __init__.py file (from “tuya” component). I success to compile this file that is now stored in the __pycache__ folder located in the path : /srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/tuya/__pycache__.
However, when I am restart homeassistant, it seems this new compiled file is not taken into account.

Do you know if I am working on the right path for HomeAssistant to take into account my changes ?

Thanks

Look at making a copy of the tuya component, and add it as a custom component. The custom component will have priority over the built in component.

Thanks Codec303, your proposal is working fine :wink:

1 Like