Closed bradeales closed 2 years ago
I also see this in the logs when disabled/enabled:
Logger: homeassistant.config_entries
Source: custom_components/flair/__init__.py:32
Integration: Flair (documentation, issues)
First occurred: 8:30:01 PM (1 occurrences)
Last logged: 8:30:01 PM
Error setting up entry for flair
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 313, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/config/custom_components/flair/__init__.py", line 32, in async_setup_entry
flair = await hass.async_add_executor_job(FlairHelper, client_id, client_secret)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.9/site-packages/flair/flair_helper.py", line 37, in __init__
self.discover_vents()
File "/usr/local/lib/python3.9/site-packages/flair/flair_helper.py", line 86, in discover_vents
vents.append(Vent(vent, self))
File "/usr/local/lib/python3.9/site-packages/flair/vents/vent.py", line 10, in __init__
self.refresh()
File "/usr/local/lib/python3.9/site-packages/flair/vents/vent.py", line 13, in refresh
vent_state = self.api.refresh_attributes('vents', self.vent_id)
File "/usr/local/lib/python3.9/site-packages/flair/flair_helper.py", line 160, in refresh_attributes
client = make_client(SESSION.client_id, SESSION.client_secret, 'https://api.flair.co/')
File "/usr/local/lib/python3.9/site-packages/flair_api/client.py", line 346, in make_client
c.oauth_token()
File "/usr/local/lib/python3.9/site-packages/flair_api/client.py", line 183, in oauth_token
self.token = resp.json().get('access_token')
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)
I've had these logs as well. It is a Flair server-side problem. Unfortunately, nothing can be done given that the problem is on their end.
I've been seeing the Flair integration failing to load a lot recently. I found this in my logs. Perhaps Flair's API server is acting up?