Using Switch from weather module outputs

Hi there, I’m really new to this and would appreciate your guidance!
Currently trying to build a telegram bot for myself that sends 1 of 2 different messages to forecast daily weather.

I have the weather module providing all the data and I’ve tested my telegram bot to work without any switches (if else conditions).

Attempted to use the switch condition to see if the description value from the weather module contains “rain” to output one message, else output another message. However I can’t get the former output to run at all despite the description value containing “rain” at the time.

I thought it could’ve been that the value of description had to be converted to an array, so I attmpted to use the toString function, or used tools to compose a string from the description.
However, none have worked so far and I have only been able to get the latter output for if there is no rain. My IsElse value is always True no matter what I add as well.

Really confused and would appreciate some guidance! Thanks

Edit: I ended up just using a router to filter conditions and created another telegram bot to output the other message. But I’d still like to learn from any guidances.

Hello @Bryan_Chai and welcome to the Make Community!

You can use the contains() function with just rain (no quotes should be used) as the second parameter.
So whether the description contains light rain, moderate rain, heavy rain, anything containing rain will match.
The contains() function will return TRUE or FALSE so those are your match conditions.
So for Input, you simply use {{contains(8.text; "rain")}}
For the pattern, you use {{true}} or {{false}}

Under the {{true}} pattern your output would be the text you want for a rain condition.
Conversely, under the {{false}} pattern your output would be the text you want for a non-rain condition.

Hope that helps!