Why does the sentence in the red circle work? Will it match all entities under the light domain in the kitchen area? and what will be done by HassLightSet intents?
There are some built-in intents. Is there a doc showing what these intents will do to matched entities?
I have a problem understanding the following example as well:
Because that’s how they’ve coded it to work. If you specify {area}, it will look for areas with that name and if one is found it will turn the area on. Turning the area on is probably the same as would happen in Dev Tools - any entity (supporting on/off) in that area will be turned on.
If you want to know what “HassLightSet” actually does, you would have to look at the code here. It does different things for “area” vs “name”.
The second example is highlighting a potential problem if you have devices with the same friendly name. If you have a light called “Kitchen” (and an area called “Kitchen”) and a media player called “Kitchen”, then saying “set kitchen brightness to maximum” would not work if it matched the media player. So specifying the expected domain via expected_domain means the media player won’t satisfy “set {name}…”.
But yes, the default intents are handled by code and (I don’t think) there’s specific documentation for what they do - you just trust they do what is reasonably expected.
Thank you, it’s more clear now.
But for the second example, I think the built-in intent HassLightSet can only operate on the light domain, so this example is not a good one.