I’ve got HA Voice and a RM3 mini IR remote both working as expected. I have learned custom IR buttons to open/close shades, created open/close scripts that work, and added buttons that call the scripts in the UI. Everything works. HA Voice works for mundane things like lights.
Now I want it to open and close the shades, but every attempt has been defeated. I even added sentence automations tied to the words “open shades” and “close shades” and linked them to the scripts. They test fine, but when I speak to HA Voice and say those words, it tells me it can’t find the shades in the room where I’m located.
So I tried deleted the location from the scripts/entities. No luck. I placed the scripts in the room where I’m located (with the HA Voice). Also failed.
I tried “shades open” and “shades closed”. Then HA Voice tells me it doesn’t understand.
Oh, and I also “exposed” the scripts to the voice assistant through the UI and even added “aliases” to those phrases.
And I’ve run out of ideas at this point. Seems like this should be a lot simpler.
Have you tried a more complicated sentence? It sounds as if HA Voice is hearing the keywords “open” and “close” and trying to find an entity with the device class “cover” to apply them to, rather than allowing the whole sentence to trigger the automation.
Edit: Do your shades have the device class “cover”?
the shades are controlled through a broadlink IR device, so the entities to control them are scripts that call the IR device. they don’t get a device class, afaik.
I tried prefixing the command with the room and reversing the order of words. nothing works. I really only want to say:
[wakeword] open shades
[wakeword] close shades
Is there a way to bypass keywords like “open” or a way to use “open” and “close” with scripts? any other ideas?
as you are asking the assistant to run a script then you need to use the relevant intent. so in this case you are not directly asking to open a cover. you can find a list of intents here. Talking to Assist - Sentences starter pack - Home Assistant another aproach you could use is to create an automation with a sentence trigger. example:
I have two scripts called: “Open Shades” and “Close Shades” and looking at the starter pack link you sent, the formula for scripts is “run [scriptname] script” which also does not work. HA Voice says “I am not aware of a device called [scriptname]” even though I clearly say to run a script.
@robgough1970 is right, you need to create a custom sentence and an intent - sorry, I thought you had already done that. Your automation sentence trigger is not the same thing.
Since you’re using Broadlink, a work-around might be to create a switch to open and close the shades, then use the “change device type of switch” helper to make that switch a cover. HA voice would then recognise the switch and turn it on and off when you gave the commands “open/close shades”.
You can find out how to make Broadlink switches here:
… and how to change the device type of a switch here:
caveat, I am not too deep into HA’s internals and a lot seems to have changed with configuration.yaml and setup/storage. mine is basically empty despite having dozens of integrations. what’s going on here. many examples show editing configuration.yaml although that’s no longer the place to put these things?
going in reverse, they are just scripts, not switches. the change device type helper does not see them.
the broadlink is setup/working and IR codes defined, but they are in ./.storage/broadlink_remote_e870723eb3dc_codes not and .yaml files. I don’t see any way to get to the .yaml from the UI and i’m hesitant to put this broadlink example into the root (basically empty configuration.yaml) as I’m on my way out the door for a trip
back from travel. working on this and still no progress. I tried debugging the voice pipeline. it only allows text. when I type in “open shades” or “close shades” in the text assist pipeline, it works as expected.
to recap, there is no shades device. just an IR transmitter tied in with scripts.
none of the advice above works. I can only control shades with the UI or text input. the HA Voice just says it doesn’t understand or can’t find a device with that name.
progress sort of. debugging voice gives the following, but nothing actually happens (with the shades). and HA Voice is no longer outputting audio. I have to click the “Play Audio” button on the debug page to hear the output. it was working before and nothing has changed.
this is the output from “open shades” and “shades open”
two things happened – the ip of the HA interface on network was lost (voice error) and the IR emitter was occluded since my last test (shades error) – it’s working now.