Accuweather current conditions to trigger an automation

I am trying to figure out how to have a switch turn off if the accuweather current condition changes from sunny (or cloudy - or whatever else) to rain.

But I can’t figure out where to find any current condition text to use to trigger that automation.

Does anyone have any insight?

Thank you!

More info:

I found a post that has you add a sensor into the config.yaml file with this:

value_template: “{{ state_attr(‘weather.wx’, ‘forecast’)[0][‘condition’] }}”

However, for me, it’s currently showing as “rainy” but when I look at “weather.wx” on an entity card, it says it’s Party Cloudy. Where’s it picking up Rainy from?

I’m sure I’m querying someplace incorrectly but I don’t know what “correct” is.