Slot program to read hassio entities?

Hi,

I read that it should be possible to read hassio entities and auto populate slots using a slot program.

However I can’t find an example how to do this. My rhasspy is running on a standalone Pi 4 and running fine so far. Can switch my Home Assistant lights using Node-RED websocket and HA call service node.

Instead of typing all my light names in a slot, I would like to connect to the HA instance with a slot program…

Kind regards
Thomas

Can you link where you read this? it is possible to fetch all entity_ids from Home Assistant via a API call. But this slot program is new to me. Never heard of it…
What you can do at the moment is event based handeling and manually add the entity_ids… it won’t take much time… i did it myself aswell.
You can copy parts from here: Basic Homeassistant Automations for Climate and Switch Entities - Rhasspy 2.5
You would need to change the naming to the according Platform of course…

A full integration is in the works at the moment…

Hope i was able to help you.

Slot programs can be used to automatically create slot values. They will be called every time you train rhasspy to generate the slot values for that slot. Usefull if you have a slot with frequently changing values. Like for example the names of songs in a playlist or something else.
https://rhasspy.readthedocs.io/en/latest/training/#slot-programs

now i know what you mean…
the thing is, unless you name the entities in home assistant the way you want to call them via rhasspy, there is no actuall way of doing this automatically…
You would need to write a custom script for adding slots with a synonym for the entity_id…
I could help you with that… if thats your preferred way to go…

Thank you for clearification guys.

I just did some typing :slight_smile:

Of course it would be great to structure all names an everything that it works automagically, like I thought before, but it is to much effort :smiley:

I searched for it on github and found:


Maybe this is what you wanted…
2 Likes

Cool, thats what I meant!

If I would be doing a fresh HA setup now, I would take that into considerration and put the naming in a way that I could use my lights etc right away.

However my home is smart for quite a while now and I think it’s to much work to make everything fitting. Who knows what happens to my automations and so on if I change all those names :smiley: