There are at least three ways to learn this. I’m listing them in the order I used, since I’m more comfortable reading through the code itself. However you might want to focus most on #3 since that’s the most simple and doesn’t require looking at any code. -
1 - In the code I linked above (this one), it tells you exactly how it works in plain words:
description: Turn a light on.
description: If the light should flash. Valid values are short and long.
In the text segment above (starting with “flash:”) is in the code, and I found it by searching for “flash”. The first 3 lines (“turn_on”) are at the top of the indenting of flash. That means the flash parameter is part of the
turn_on service. The “flash” parameter is also under
toggle. So from that I know that “flash” is a valid flag for those 3 services.
2 - To confirm what I read in the code was correct, I went into my Home-Assistance instance, then to Developer Tools, then Services, and selected the
light.turn_on service. From there, at the bottom, it shows you all the possible valid options. I was able to see that the flash parameter was described there.
3 - You can check the documentation for light entities and it will describe the flash parameter being valid for the same 3 services mentioned previously. The documentation is here: https://www.home-assistant.io/integrations/light/#service-lightturn_on