Giter Club home page Giter Club logo

Comments (7)

LaurenceJJones avatar LaurenceJJones commented on May 24, 2024

Hey 👋🏻

Looking at home assistant docs they provide a link to -> https://jinja.palletsprojects.com/en/latest/templates/#jinja-filters.int

I dont know what the template look like but I guess you should be able to type conversion?

from server.

lezruk avatar lezruk commented on May 24, 2024

All these filters are fine, but problem is that POST_JSON result is ALWAYS sent in quotes, which is interpreted as string. Thus gotify rejects it.

from server.

jmattheis avatar jmattheis commented on May 24, 2024

You can set the priority like this in home assistent (also included markdown support):

notify:
  - name: gotify_high
    platform: rest
    resource: https://gotify.example.org/message
    method: POST_JSON
    headers:
      X-Gotify-Key: AsQHYA96LH90.RT
    message_param_name: message
    title_param_name: title
    data:
      priority: 10
      extras:
        client::display:
          contentType: "text/markdown"

from server.

lezruk avatar lezruk commented on May 24, 2024

Appreciate your answer, hardcoding value in data.extras works. Idea though is to avoid hardcoding and send priority as a value for individual message call within same service. Therefore I opened this request for evaluation.

from server.

jmattheis avatar jmattheis commented on May 24, 2024

How do I manually trigger an alert with priority in home assistant? developer-tools/service doesn't have a priority.

from server.

lezruk avatar lezruk commented on May 24, 2024

How do I manually trigger an alert with priority in home assistant? developer-tools/service doesn't have a priority.

There is target parameter for notification service, that you can map to priority for gotify call. But again internally that is sent in JSON in quotes and doesn't work. Other option would be sending payload as fields in POST call, yet in this case markdown is lost as gotify doesn't support extras parameters without json. I saw somewhere here request to implement extras fields params i gotify but that was not done

from server.

aagit avatar aagit commented on May 24, 2024

Same here, I also tried to pass priority as string and didn't work. Corollary problem is the click url needs to be null in json to be ignored by the android client, the empty string should be treated like null.

from server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.