Force HA to use custom pyHik version

Hi,

I recently encountered a ‘binary_sensor’ error for the Hikvision platform during Home Assistant boot. After reporting the issue, I was asked to test an updated ‘hikvision.py’ file in my HA installation (https://github.com/mezz64/pyHik/issues/93).

Updated hikvision.py file is located here: https://github.com/mezz64/pyHik/tree/trig-fixes

I seem to lack access to both /usr/src/homeassistant and /usr/local/lib/python3.11/site-packages/pyhik/ while using the root account on SSH, as I’m running Home Assistant Operating System.

How can I test it? I attempted to place the files in ‘custom_components/pyhik’ and ‘custom_components/hikvision’, but had no luck.

/config/deps (Remember to place the entire lib directory, not just the changed file)

so I just put all files from https://github.com/mezz64/pyHik/tree/trig-fixes/pyhik in /confid/deps/pyhik?

Use pip to do it, example here: Integration Manifest | Home Assistant Developer Docs
(only first part is needed, and you need to use the git format as shown further down on that page)

cd /config/deps
git clone GitHub - mezz64/pyHik: Python wrapper for Hikvision camera event stream
pip install -e ./pyHik

error: externally-managed-environment
× This environment is externally managed
╰─>
    The system-wide python installation should be maintained using the system
    package manager (apk) only.

    If the package in question is not packaged already (and hence installable via
    "apk add py3-somepackage"), please consider installing it inside a virtual
    environment, e.g.:

    python3 -m venv /path/to/venv
    . /path/to/venv/bin/activate
    pip install mypackage

    To exit the virtual environment, run:

    deactivate

    The virtual environment is not deleted, and can be re-entered by re-sourcing
    the activate file.

    To automatically manage virtual environments, consider using pipx (from the
    pipx package).

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

I’m not sure if I should use the ‘–break-system-packages’ option with pip now?