custom-components / sensor.untappd

🍻 Untappd Integration
https://untappd.com/
MIT License
38 stars 10 forks source link

Component broken #27

Closed gkron92 closed 4 years ago

gkron92 commented 4 years ago

Hi,

I'm getting the following error in my log. The sensors aren't created. I’m on HA 0.108.1.

Error while setting up untappd platform for sensor Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 178, in _async_setup_platform await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT) File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 442, 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/untappd/sensor.py”, line 64, in setup_platform add_devices([UntappdCheckinSensor(username, api_id, api_secret)]) File “/config/custom_components/untappd/sensor.py”, line 85, in init self.update() File “/config/custom_components/untappd/sensor.py”, line 90, in update self._apisecret, self._username) File “/usr/local/lib/python3.7/site-packages/pyuntappd/init.py”, line 26, in get_last_activity activity = get_last_activity[‘response’][‘checkins’][‘items’][0] IndexError: list index out of range

iantrich commented 4 years ago

Do you happen to have 0 checkins?

gkron92 commented 4 years ago

Ugh. I did have zero check-ins. I added one and it works. Sorry to waste your time.

Gary

Sent from my iPhone

On May 2, 2020, at 10:56 PM, Ian Richardson notifications@github.com wrote:

 Do you happen to have 0 checkins?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

iantrich commented 4 years ago

Well it is a bug in the component still, but makes sense now :beers: