Hey all,
i plan to write a own integration. I expect that the integration will be very simple and try to follow the best practice guide as good as possible.
The integration will provide some sensor entities. All of this entities should be generated by simple http api calls
I used python3 -m script.scaffold integration
to create the skeleton.
In a next step i would like to edit the config_flow.py
file. I would like to create a basic check if the target host is available. (technically i just want to check if i get a http.response code 200 for my request to confirm that the http endpoint is reachable)
In the example and also in other integrations i see that they use at this point mainly code from their own PyPi-Package and methods/functions provided by this own package. However, i do not have a specific package. I would like to use simple http requests with the help of the requests library in python.
Thats why i would like to ask you:
Is this the right place to store my code? Do i need in every case an own pypi package providing the different methods or can i place my code direct in config_flow.py regarding the config checks (and later in sensor.py if it comes to the different api calls) ?