Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not receiving message with data properties #7

Open
BenDavidson90 opened this issue Oct 5, 2023 · 3 comments
Open

Not receiving message with data properties #7

BenDavidson90 opened this issue Oct 5, 2023 · 3 comments

Comments

@BenDavidson90
Copy link

Hi,

I succeed to configure the plugin and send message to my Ntfy via Home Assistant, so thank you for that !
But there is a problem, when I put data properties like "priority" or "click", I don't receive any message.
Here are Home Assistant logs output:

Logger: custom_components.ntfy.notify
Source: custom_components/ntfy/notify.py:89
Integration: ntfy (documentation, issues)
First occurred: 10:29:29 (9 occurrences)
Last logged: 11:47:53

Error while sending ntfy.sh message: 400 Client Error: Bad Request for url: https://###/

To test, I used your codes snippets (by replacing service by my ntfy service) like this one:

action:
  - service: notify.my_ntfy
    data:
      message: "This is a test message."
      title: "ntfy Test"
      data:
        priority: 10
@M1K3-NL
Copy link

M1K3-NL commented Oct 6, 2023

How did you rename the service to your own and got it working? It's not working on my end.

@BenDavidson90
Copy link
Author

BenDavidson90 commented Oct 6, 2023

How did you rename the service to your own and got it working? It's not working on my end.

In the configuration.yaml:

notify:
  - name: "Ntfy Test"
    platform: ntfy
    ...
  - name: "Ntfy 3D Print"
    platform: ntfy
    ...

You have to restart completly home assistant, after that you can use them directly. In my case:

  • notify.ntfy_test
  • notify.ntfy_3d_print

Here the action in one of my automation for example:

action:
  - service: notify.ntfy_3d_print

@ninharp
Copy link

ninharp commented Dec 29, 2023

Since the issue is still open... the test snippets in the repository are wrong. the priorities range had a max of 5 so a priority of 10 will result in a 400 Bad Request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants