jugla / worldtidesinfocustom

world tides info custom component for home assistant
MIT License
28 stars 2 forks source link

Issues while setup the integration #3

Closed sergio-nuvemshop-zz closed 3 years ago

sergio-nuvemshop-zz commented 3 years ago

This is what I am getting in the logs when I try to install de integration through HACS. I already bought prepaid credits on Worldtides website. Any idea what is going wrong?

Error while setting up worldtidesinfocustom platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 198, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/worldtidesinfocustom/sensor.py", line 82, in setup_platform
    tides.retrieve_tide_station()
  File "/config/custom_components/worldtidesinfocustom/sensor.py", line 299, in retrieve_tide_station
    self.credit_used = self.credit_used + self.init_data["callCount"]
KeyError: 'callCount'

And here is what I have in my configuration.yaml

sensor:
  - platform: worldtidesinfocustom
    name: tides
    api_key: 77c3e8fc-XXXX-40c7-b8b6-XXXXXXXX
    latitude: 45.61949378902948
    longitude: -1.0318721687376207
sergio-nuvemshop-zz commented 3 years ago

24 hours after I posted the issue, the integration started working without me made any change. I assume that is related to the time that has elapsed after I bought the credits.