clyra / homeassistant

Homeassistant stuff

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

my_unifi

buhralex opened this issue · comments

commented

Hey I just stumbled across an old thread in the homeassistant forum and found your my_unifi component.
I figured out, that I had to add a manifest.json but I cannot get this to work.

Can you by chance take a look at that.

Here is what happens when the component tries to start:

Source: custom_components/my_unifi/sensor.py:198
Integration: Sensor (documentation, issues)
First occurred: 19:18:12 (1 occurrences)
Last logged: 19:18:12

my_unifi: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 618, in async_device_update
    await task
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/my_unifi/sensor.py", line 107, in update
    self._data.update()
  File "/config/custom_components/my_unifi/sensor.py", line 239, in update
    device_list = (self.list_clients())
  File "/config/custom_components/my_unifi/sensor.py", line 198, in list_clients
    data = r.json()['data']
  File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 910, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/simplejson/__init__.py", line 525, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.9/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/local/lib/python3.9/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)