Help needed: How to clean a room with GH voice command

I got a robovac Dreame S7 setup in HA and it works perfectly. Via automation I can get it to clean a specific room and make it go back to the dock earlier.

I also want to start the vac by voice via Google Home. For this I added an input_button to HA and to the automation. In HA-Google Assistant I added an alias for this button. If I use this alias in a voice command then I am able to start the vac. All good this far.

The robovac can also be directed to a specific room to clean. I used the same routine here and setup a input_button and automation. Added the entity to Google Assistant, gave it an alias and made it available. But now I ran into a problem.

I want to let the robovac clean the kitchen (keuken in Dutch). Kitchen is also a area name.
remark: Stofzuig = Vacuum clean
As alias I use [Stofzuig de keuken] but this confused Google Home
Is there a better way to start an automation via Google Home?

You could create a Script in HA which has the same Action as your room specific Automation (let’s call it “Kitchen Vacuuming”), then expose that Script to Google. To run the Script via Google you then say “Hey Google, activate Kitchen vacuuming” (or whatever you call your Script in HA). The word ‘activate’ in Google Assistant will run the like-named script.

No need for input_buttons etc.

Thanks for the quick reply.
With script you mean a python script?
Could you maybe point me to a example to start with.

No, HA script, next to the Automations tab

Aha, okay. I see. I will dive into this. Thx

As per Nick’s comment. No need to do much other than copy your existing Automation code into a script