Coder Social home page Coder Social logo

Comments (2)

MichaelBitard avatar MichaelBitard commented on August 19, 2024

Indeed the keywords you see in the code are not variables passed on to home assistant, but are keywords the signal-cli I rely on to communicate with signal uses. It's only internal to this addon.

Home assistant receives what is passed to https://github.com/agileek/hassio-addons/blob/master/signal/root/app/ws.py#L6

I'll have to look into the intents again to see what is received by the intent, and what can be used. Could be a good opportunity to add this to the readme too

from hassio-addons.

bastiaanterhorst avatar bastiaanterhorst commented on August 19, 2024

Ah, thank you for pointing me to that. If I read the code correctly, only the message is passed as a variable named text. I assume this is what HA internally expects to trigger intent handling. This bit:

await websocket.send(json.dumps({
                    "id": 1,
                    "type": "conversation/process",
                    "text": message,
                }))

Looking here it seems that text is the only thing to pass (assuming this websocket call triggers conversation.process internally. Looking at the source of that service, I don't think it is even possible to pass it other things unfortunately -- but I might be reading it wrong.

I will try to edit my local code and pass it some other things and see if they arrive in the intent_script, when I have a moment. I also see on that page that it should be possible to use slots to make commands variable (like 'set thermostat to 19', where 19 is a variable passed to the intent_script). I'll play with this also.

If I figure something out I'd be happy to contribute a PR to the docs to explain how to do this.

from hassio-addons.

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.