Skip to content

Grocy integration issue(not addon) #339

@malosaaa

Description

@malosaaa

Describe the bug

So grocy itself works, but the problem is in devices its not loaded, when i try to reload i get that error.

After upgrading Home Assistant OS from 2025.3.3 to 2025.4.1, the Grocy integration fails to set up and throws a JSONDecodeError.

Expected behavior

Grocy integration should load normally without errors upon system startup or reload.

The error

Logger: homeassistant.config_entries
Source: config_entries.py:751
First occurred: 12:11:57 (3 occurrences)
Last logged: 12:13:30

Error setting up entry Grocy for grocy
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/requests/models.py", line 974, in json
    return complexjson.loads(self.text, **kwargs)
           ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/simplejson/__init__.py", line 514, in loads
    return _default_decoder.decode(s)
           ~~~~~~~~~~~~~~~~~~~~~~~^^^
  File "/usr/local/lib/python3.13/site-packages/simplejson/decoder.py", line 386, in decode
    obj, end = self.raw_decode(s)
               ~~~~~~~~~~~~~~~^^^
  File "/usr/local/lib/python3.13/site-packages/simplejson/decoder.py", line 416, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
           ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 751, in __async_setup_with_context
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/grocy/__init__.py", line 45, in async_setup_entry
    coordinator.available_entities = await _async_get_available_entities(
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        coordinator.grocy_data
        ^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/config/custom_components/grocy/__init__.py", line 73, in _async_get_available_entities
    grocy_config = await grocy_data.async_get_config()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/grocy/grocy_data.py", line 94, in async_get_config
    return await self.hass.async_add_executor_job(wrapper)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/grocy/grocy_data.py", line 92, in wrapper
    return self.api.get_system_config()
           ~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/site-packages/pygrocy2/grocy.py", line 319, in get_system_config
    raw_system_config = self._api_client.get_system_config()
  File "/usr/local/lib/python3.13/site-packages/pygrocy2/grocy_api_client.py", line 735, in get_system_config
    parsed_json = self._do_get_request("system/config")
  File "/usr/local/lib/python3.13/site-packages/pygrocy2/grocy_api_client.py", line 356, in _do_get_request
    raise GrocyError(resp)
          ~~~~~~~~~~^^^^^^
  File "/usr/local/lib/python3.13/site-packages/pygrocy2/errors/grocy_error.py", line 9, in __init__
    json = response.json()
  File "/usr/local/lib/python3.13/site-packages/requests/models.py", line 978, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Full traceback available above — appears to fail while trying to retrieve system config from Grocy via pygrocy2.

Installed versions
• Home Assistant OS: 2025.4.1
• Grocy: 0.24.0
• Grocy integration: (custom component)

How is Grocy installed?
Installed via Home Assistant Add-on.

Additional context
This was working fine before the upgrade. The error started immediately after updating to HA 2025.4.1. Seems like Grocy API is returning an empty or invalid response when queried for system config.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions