Using secrets or other methods to define multiple phone numbers as sms sender and filter them

Hi
I need add multiple phone numbers in secret file and in my program make this condition which any of that phone numbers was the sender, accept them.
would you please help me to write multiple phone number in one heading, in correct format, in secret file, and point it out correctly in my program.
somthing like this:

#...
- if:
        condition:

          - lambda: |-

              return (id(sms_message).state == "esp relay state") && ((id(sms_sender).state == !secret PhoneNumber " ));

        then:
#...

If through secret file its impossible please give me another method.

Unfortunately, no one helped me. Maybe I should ask my question in a different way.
As you can see in this picture, how can define multiple phone numbers in the secret file and the forwarded message can be sent to all those numbers in the forward section.

this is my secre file that do not know how to add multiple phone numbers!!?

Hello.

First of all, you generally have a seperate secrets file for ESPHome which is in the same directory as your ESPHomwe device yaml…

So maybe get that working with a single number first?

Edit:
Then, maybe set up your numbers like this.

phone_numbers: "+4956834945, +4956834944, +456556834944"

And then look at looping through a csv list?

Thanks for your response
my second post is using GSM Modem in Home assistant and not for Esphome.
I did not open a new post and mentioned it in the same post
Yes in Both methods (Esphome with Sim800L and in Home assistant With GSM Modem) I got work with single number.
Now my problem is the second method (Home Assistant with GSM Modem ) like this Link:

I see. Consider rephrasing / clarifying your problem and questions in your OPs.

Otherwise people like me may come along, see your OPs, and try to help you solve a problem which doesn’t exist.

1 Like

No, I think you misunderstood my meaning.
The problem raised in the first post still exists for me, but at the moment the problem raised in the second post is vital and necessary for me.
I am now reading the guidance link you sent.
In my opinion, both problems are similar to each other.