Built-in vs custom intents - priorities

Dear Community,
I read in some place here, that custom intents should have priority over standard intents.
I am struggling to understand, why it does not work for me this way.
For example, I defined custom sentence to move shades to specific percentage, which overlaps with built-in intent to control brightness.

My custom intent is defined as follows:

UstawRolety:
data:
- sentences:
- “(przesuń|przestań|przestaw) rolety na {zakres} [procent|%]”

The intent is matched as expected when I use verb “przesuń” (not used in built-in intents):

… but when I use verb “przestaw” (also used in built-in intent HassLightSet to control brightness), then the built-in intent HassLightSet is matched instead of my custom intent:

Does anyone know, whether this is a bug or a feature? Am I wrong assuming that custom intent should have higher priority over built-in intent?
Or maybe there is something I defined incorrectly?
Thanks in advance for any hint!

Collisions, in general, are a big problem of this system. Inside the Intens repository, they are determined at the testing stage. Try to avoid them, you can use domain filtering.

        requires_context:
          domain: cover

Maybe this will help you.

Thank you mchk for a hint.
I added domain filtering in the following way:

  UstawRolety:
    data:
      - sentences:
          - "(przesuń|przesunię|przestań|przestaw) rolety na {zakres} [procent|%]"
          - "rolety na {zakres} [procent|%]"
        requires_context:
          domain: cover

Unfortunately still standard intent is matched for a verb “przestaw”

To me it would be more logical if custom intents were always processed as first priority.
Do you think it makes sense to raise it as an issue?

wait for the major HA update, it looks like your problem has already been solved

image

I think the priority should remain with the built-in intents. When they are written correctly, they do not create collisions due to the use of generalized templates.

Now there is a period of formation, so various mistakes happen. But you can always participate in their correction.

1 Like

Thank you Mchk, I will then wait patiently :slight_smile:

And yes, I would be happy to be able to help (if only I could be useful when not really having development skills and experience). I will go through the documentation to find out, if and how I can contribute.

Thanks again!