Setup of platform xxx taking over 10 seconds , how to improve?

Runnng Hassio (Hassos) so cant use pip…

Ok, i have a custom component, that has a requirement, its a verry small requirement, but on every restart i receive this warning , so i want to speed it up :

WARNING (MainThread) [homeassistant.components.sensor] Setup of platform kostal is taking over 10 seconds.

this is the requirement in the code :

REQUIREMENTS = [
    'https://github.com/gieljnssns/KostalPikoPy/archive/'
    'master.zip#pikopy==1.1.0']

so i, thougt, ok gonna be smart, i place that piko-master.zip in the custom_components folder, but then i receive the error below, question 1 : can i place that :PikoPy-master.zip file somewhere locally?

changed code to :
REQUIREMENTS = ['PikoPy==1.1.0']

2019-04-06 15:01:52 ERROR (SyncWorker_3) [homeassistant.util.package] Unable to install package PikoPy==1.1.0: Could not find a version that satisfies the requirement PikoPy==1.1.0 (from versions: 0.9.0)
No matching distribution found for PikoPy==1.1.0
2019-04-06 15:01:52 ERROR (MainThread) [homeassistant.requirements] Not initializing kostal.sensor because could not install requirement PikoPy==1.1.0
2019-04-06 15:01:52 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform kostal.sensor: Could not install all requirements.

so ok not working… but i have heard of pypi, so thinking , ok, on next HA restart it will install an official component, this is then only needed 1 time?
so changed code to …
REQUIREMENTS = ['PikoPy==0.9.0']
=> https://pypi.org/project/pikopy/

but then i receive the error below:
question2 , how can i resolve this? :slight_smile:

2019-04-06 15:04:37 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform kostal
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/kostal/sensor.py", line 57, in setup_platform
    from pikopy.piko import Piko
  File "/config/deps/lib/python3.7/site-packages/pikopy/piko.py", line 27, in <module>
    import urllib2
ModuleNotFoundError: No module named 'urllib2'

thnx

Urllib2 seems to be depreciated, looks like the pikopy is too old? See here: https://stackoverflow.com/questions/50897423/urllib2-not-installed

But is that the reason?