Dumb Question for NR and HA skills

I need a bit of basic help with some Rhasspy to Node-Red to Home Assistant skills.

I’ve setup some skills to get the forecast, current conditions, the time, and the temperature (outside and in).

Now I’d like to setup some basic (to start) light controls to turn some lights on and off.

So I have a sentence in Rhasspy
[TurnState] (turn on | turn off){state} [the] ($object){object}
and a object slot with my lights.

Now do my lights in the object slot need to match the name of the lights in HA?

I assume they do but I’ve made a lot of assumptions today and very few have been correct :slight_smile:

It makes life probably easier for you, because then you can use them in a template like so (I use events but the principle also goes for intents. Also, change your sentence so that “turn” outside the state, because then you can use that in a template as well.

[TurnState]Turn (on | off){state} [the] ($object){object}

- id: '1581372525473'
  alias: EventLampen
  trigger:
  - event_data: {}
    event_type: rhasspy_Lights
    platform: event
  condition: []
  action:
  - data_template:
      entity_id: light.{{ trigger.event.data.object }}
    service_template: light.turn_{{ trigger.event.data.state }}
  - service: mqtt.publish
    data:
      topic: hermes/dialogueManager/endSession
      payload_template: '{"sessionId": "{{trigger.event.data._intent.sessionId}}",
        "text": "Ok, {{ trigger.event.data.object }} {{ trigger.event.data.state }}"}'

If you do have other object names for lights then entity is, you must program around the template for light.{{ trigger.event.data.object }}

I do not know why you mention Node-Red, but it is possible to not use Node-Red and connect Rhasspy directly to Home Assistant.

Node-red offers the ability to do so much, so quickly, and in a fairly simple manner.

I tried to use intents and event in HA with rhasspy. There was so much restarting and automations that I found it a nightmare.
Without restarting HA I created a NR flow that takes the intent from Rhasspy, pulls some data from HA and gives me the response.
I’ve also created a ‘smart’ speaker of sorts using NR and my Chromecast.

Ok cool, I was just mentioning it because I’ve read before that people assume Node-Red is required to operate HA and Rhasspy, while it is not :slight_smile:

I agree that Node-Red is very powerfull if it is in your skillset. I’d love to see what kind of flows you have created, do you have anything on github or something?

If you want to use Node-Red, you can also easily publish the endSession and call various services with the HA nodes. You can also create a mapper of some sorts to map Rhasspy’s objects to your HA entity’s and call the via the Call Service node.

Whatever suits you best