Unknown error when trying to send a simple message to my phone via the Pushsafer integration

Failed to perform the action notify.pushsafer. Unknown error

I tried sending a simple notification with the message “hi” to all of my devices that are connected to my Pushsafer account but it doesn’t work. I get the abovementioned error. What now?

It looks like this is the related log entry:

Logger: homeassistant.components.websocket_api.http.connection
Source: components/pushsafer/notify.py:94
integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 18:07:27 (5 occurrences)
Last logged: 18:21:36

[547336112880] Error handling message: Unknown error (unknown_error) Rape Dungeon from 93.197.150.233 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36)
[545874146160] Error handling message: Unknown error (unknown_error) Rape Dungeon from 93.197.150.233 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 28, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 816, in handle_execute_script
    script_result = await script_obj.async_run(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        msg.get("variables"), context=context
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1808, in async_run
    return await asyncio.shield(create_eager_task(run.async_run()))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 464, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 528, in _async_step
    self._handle_exception(
    ~~~~~~~~~~~~~~~~~~~~~~^
        ex, continue_on_error, self._log_exceptions or log_exceptions
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 558, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 526, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 762, in _async_call_service_step
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<9 lines>...
    )
    ^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 727, in _async_run_long_action
    return await long_task
           ^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2794, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2837, 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 94, in send_message
    picture1 = data.get(ATTR_PICTURE1)
               ^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'
  • Core2025.2.5
  • Supervisor2025.03.4
  • Operating System14.2
  • Frontend20250221.0

Could you switch to YAML mode and then copy the text in here? (Remember to react private keys and the like)

action: notify.pushsafer
data:
  message: hi

The error seems to indicate that no value was given for picture1, which seems to be a possible extra data that could be inserted, but here it looks like the integration require it or think it is included, but with has no value.
This sounds like a bug.

1 Like

You were right. I entered a value for picture1 and it worked. It even worked when I did not specify a picture. But I had to enter “picture1” like this:

action: notify.pushsafer
data:
  message: hi
  data:
    picture1:

If you have the energy you might want to report it as a bug.

1 Like

I did. Thanks for thinking about my energy…

I think you may want to rename your devices before posting here again.

Sigh…fine.

So you think “rape dungeon” is acceptable here? And you sigh when you are called out?

2 Likes

I honestly didn’t put any thought into it and am personally not offended by dark humor. I think there are worse things. However, I am sorry if this offended anyone and I changed my HA’s name in case it pops up in any logs or so in the future.
The sighing was a bit tongue-in-cheek.