Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update entities script to allow for exclusions #319

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

C64ever
Copy link

@C64ever C64ever commented Feb 16, 2023

When setting up Rhasspy, I realized there are some entities I didn't want to be voice activated, and I couldn't find a way to prevent them from being added to the entity list, so I modified this script slightly to check if "${RHASSPY_PROFILE_DIR}/slot_programs/hass/excluded_entities" exists, and populate an array of excluded entities from it.

I created the "excluded_entities" file at the aforementioned location and added the entities I personally wanted to exclude, each as a line item in the file. Then, I expanded the IF check in line 62 to determine if the entity_id could be found in the array of excluded entities. If the entity_id isn't found in the array of exclusions, then it can be added.

This has been tested and is working well in my Rhasspy setup. I hope this small change might be helpful to some folks.

When setting up Rhasspy, I realized there are some entities I didn't want to be voice activated, and I couldn't find a way to prevent them from being added to the entity list, so I modified this script slightly to check if "${RHASSPY_PROFILE_DIR}/slot_programs/hass/excluded_entities" exists, and compile an array of excluded entities from it. 

I created the "excluded_entities" file at the aforementioned location and added the entities I personally wanted to exclude, each as a line item in the file. Then, I expanded the IF check in line 62 to determine if the entity_id could be found in the array of excluded entities. If the entity_id isn't found in the array of exclusions, then it can be added.

This has been tested and is working well in my Rhasspy setup. I hope this small change might be helpful to some folks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant