I’m assuming that no one answered the question because no one who’s been on here this past week has a confident answer to give you.
My non-expert answer would be that what you’re asking is not possible. As far as I’m aware, Google has the ability to trigger defined states in items (e.g. ON or OFF), but not convert voice commands to strings for the purpose of controlling items.
What are you trying to accomplish? If you tell us the end result you’re aiming for, there might be other ways to do it without having to resort to strings.
If you only want to do it for a handful of favourite channels for which you’ve also defined the IR codes, then you could set up individual switches for each one. So you would have a ZEE STUDIO switch that has ON and OFF states, and you would expose it to GA, then set up a routine for the phrasing you want to use. Then you’d just have a rule that triggers the code when the switch toggles ON.
The downside of this is that you’d have to have as many switches as you have channels, but that doesn’t really matter if you rarely use the Google Home app.
The alternative would be to pick up a Logitech Harmony Hub, which does exactly what you want natively via its Google Assistant action. A Broadlink RM Mini 3 might also work, but I don’t know how advanced its Google Assistant action is.
Does such an action exist in Google Assistant? I haven’t read through the documentation enough to know one way or another, but if you find out what needs to be done then you could bring it to the attention of the volunteer developers who are maintaining the GA action in openHAB. They might just need someone to tell them why it would be useful (or to tell them that it’s possible).
(Stuart Hanlon, UK importer of Velbus hardware)
May I throw a curve ball in?
What about doing the transformation within the Google environment using routines?
(The same is possible in the Alexa environment)
A transformation / routine in Google that does something like this
If Google hears
“Change channel to ZEE STUDIO”
It will actually send a number to an openHAB2 item.
@rlkoshak I just wanted to understand how is it implemented in the IFTTT Google Home integration . Like they way it uses google voice commands to accept a string or a number or both in a voice command and then process a action based on that . Does IFTTT google assistant interation do it someother way and we cant adapt it ?