#How to expose a Node-Red flow/node to Assist?

1 messages · Page 1 of 1 (latest)

jaunty minnow
#

I need to be able to activate my Node-Red flow directly from Assist without passing through an external script or entity so the satellite ID and other info will get into the payload. But I can't seem to figure out how to expose a node to Assist!

It cannot be a Sentence node as I also need the AI to get involved and Sentences are picked up before it ever gets processed by the AI.

Please help me expose a node to Assist.
(Note: This question was also posted in #1284966915055288530)

broken flame
jaunty minnow
orchid rapids
# jaunty minnow I need to be able to activate my Node-Red flow directly from Assist without pass...

If you have installed NodeRed as an app or addon the exchange between HA and NR is handled by the 'blue' nodes on the left in the NR screen. This is for entities from HA. If you want to use entities created in NR to show up in HA, you need to install NodeRed Compagnion as well . For the first type I suggest this YT tutorial.https://youtu.be/-tpDg_2h1vo?is=uJfHH89if8XQj_js

Découvrez comment simplifier vos automatisations Home Assistant grâce à Node-RED. Dans cette vidéo, je vous guide pas à pas pour installer et configurer Node-RED sur votre installation Home Assistant. Vous apprendrez à créer des flows personnalisés pour automatiser vos lumières, vos thermostats et bien plus encore. Un exemple concret d'...

▶ Play video
#

If it is the second type, let me know. I can find a tutorial as well.

jaunty minnow
# orchid rapids If you have installed NodeRed as an app or addon the exchange between HA and NR ...

Thank you for you reply. But I don't really see how this can help me with my issue, so let me try to explain it a bit more specifically:

I'm making a light-opening system reacting dynamically to what room you stand in and what device was used to turn on the lights. Node Red will be in charge of checking who asked for the lights to be opened, match the satellite ID of the device with a phone BLE to check where the person is standing and etcetera. All I'm missing is a way to expose my flow to Assist, in the form of a tool to call, so Assist can choose to call this tool if the intent of the conversation is determined to be a request to turn on the lights (hence why I want the AI to get involved - I want to be able to say to turn on the lights however I please, and not just be limited by a sentence node.) If I use an external script to activate the flow from Assist, the satellite ID never reaches Node Red.

orchid rapids
#

Did you try the node node-red-contrib-home-assistant-websocket ? In the blue list it is named as 'sensor'. When you pull it on the canvas, you can edit this node.

#

This node I attach at the end of a NR sequence. So it shows up as a sensor in HA, where it can be used in HA automations.

#

You actually create a new device in Ha, by type, friendly name, icon, and most important : device class, unit of measurement, state class.

jaunty minnow
jaunty minnow
orchid rapids
#

I use this node in a situation where I have one or more HA entities pulled in NR to handle a complex situation resulting in an outcome. Looking to HA, there is nothing there. Let me give a first situation. I have a an 'energy' sensor on a smart switch, but the device provides only 'power' in the official integration. With some help I can extract the 'energy' but it lacks 'unit-of-measurement', it state= 'raw', and HA refuses to use it in eg. the energy dashboard. Now I pull in the raw value in NR, do some function chang to make it integer, but wat comes out I cannot return to HA. So I create using this node a new energy sensor in HA with the right state class and unit of measurement. Now I can use this sensor as input in my energy dashboard. Futher I make use of in in the NR sequenes. I can imagine you have much more complex function nodes (json) leading to device entity not existing in HA. Here you can use this node.

#

Is my understanding correct : someone with an iPhone comes in the room, mmwave detectors decide where he is, and with or withouth the person saying anything the lights should go on ?

jaunty minnow
#

I'm using the Bermuda BLE Trilateration integration to determine the position of a phone, but that's another story.

orchid rapids
#

Its like a moving presence detector.

#

Connected wth light selection by voice

jaunty minnow
#

Yes, kind of.