core: Update for sensor.opensky fails

The problem

“Update for sensor.opensky fails” The actual integration never updates, and doesn’t seem to pull any information.

Environment

  • Home Assistant Core release with the issue: 0.118.2
  • Last working Home Assistant Core release (if known): None
  • Operating environment (OS/Container/Supervised/Core): Core
  • Integration causing this issue: opensky
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/opensky/

Problem-relevant configuration.yaml

sensor:
  - platform: opensky
    name: OpenSky
    radius: 5.0

Traceback/Error logs

Logger: homeassistant.helpers.entity
Source: components/opensky/sensor.py:135
First occurred: 4:34:35 PM (1 occurrences)
Last logged: 4:34:35 PM
Update for sensor.opensky fails

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 474, in async_device_update
    raise exc
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/opensky/sensor.py", line 135, in update
    states = self._session.get(OPENSKY_API_URL).json().get(ATTR_STATES)
  File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 900, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/simplejson/__init__.py", line 525, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.8/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/local/lib/python3.8/site-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)


Additional information

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 28 (4 by maintainers)

Commits related to this issue

Most upvoted comments

This should be fixed in the most recent commit

OpenSky still fails without applying the patch mentioned in this thread. The PR was declined since apparently it is more important to have a rewrite of the component than having a bug fix merged so we could have a working component shipped with Home Assistant.