Page 1 of 1

Problems with Homeassistant

Posted: 1. Oct 2025, 18:27
by Starfighter86
Unfortunately, I can't say exactly when it started, but the Home Assistant integration is no longer working properly. For some automations, a message is still sent, but the script encounters an error and therefore some automations are no longer executed.

Here is an example Log:

Code: Select all

Logger: homeassistant.components.automation.appliance_notifications_actions
Quelle: helpers/script.py:524
Integration: Automation (Dokumentation, Probleme)
Erstmals aufgetreten: 30. September 2025 um 19:13:41 (20 Vorkommnisse)
Zuletzt protokolliert: 20:04:08

Appliance Notifications & Actions: Choose at step 3: Perform the custom start action: Error executing script. Unexpected error for call_service at pos 2: Extra data: line 1 column 52 (char 51)
Appliance Notifications & Actions: Error executing script. Unexpected error for choose at pos 3: Extra data: line 1 column 52 (char 51)
Appliance Notifications & Actions: Choose at step 4: Perform the custom start action: Error executing script. Unexpected error for call_service at pos 2: Extra data: line 1 column 52 (char 51)
Appliance Notifications & Actions: Error executing script. Unexpected error for choose at pos 4: Extra data: line 1 column 52 (char 51)
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/requests/models.py", line 976, 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 389, in decode
    raise JSONDecodeError("Extra data", s, end, len(s))
simplejson.errors.JSONDecodeError: Extra data: line 1 column 52 - line 1 column 160 (char 51 - 159)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 524, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1012, in _async_step_call_service
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<9 lines>...
    )
    ^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 624, in _async_run_long_action
    return await long_task
           ^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2835, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2878, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/notify/legacy.py", line 256, in _async_notify_message_service
    await self.async_send_message(**kwargs)
  File "/usr/src/homeassistant/homeassistant/components/notify/legacy.py", line 236, in async_send_message
    await self.hass.async_add_executor_job(
        partial(self.send_message, message, **kwargs)
    )
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/pushsafer/notify.py", line 142, in send_message
    _LOGGER.debug("Push send: %s", response.json())
                                   ~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/site-packages/requests/models.py", line 980, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Extra data: line 1 column 52 (char 51)

Re: Problems with Homeassistant

Posted: 2. Oct 2025, 11:34
by admin
Hello, the HomeAssistat Pushsafer plugin was created largely by the HomeAssistant community.

Please report your issue directly to HomeAssistant.

https://github.com/home-assistant/core/ ... shsafer%22

Re: Problems with Homeassistant

Posted: 6. Oct 2025, 01:46
by thomasfrank
This is a classic data handling error between library versions. When a third-party API changes the response format, if the integration does not strictly control Content-Type or does not handle the JSONDecodeError exception, it will “break” the entire automation chain. The best way is to wrap the response.json() part in a try-except and log the response.text() for verification. Personally, I think Home Assistant should update the official Pushsafer integration soon to handle this case.
That's Not My Neighbor