I did this exact thing yesterday, although looking at the full hourly forecast. It could be better, but here is what I currently have which I use in push notification. Hope it helps you.
{%- set ns = namespace (z=[]) %}
{%- for i in state_attr('weather.home_hourly', 'forecast') %}
{%- if i.condition == 'rainy' %} {% set ns.z = ns.z + [ (as_timestamp(i.datetime) | timestamp_custom('%-I%p')) ] %} {% endif %}
{%- endfor%}
{%- if ns.z|length > 0 %}
It is going to rain at {% for x in ns.z %}
{%- if ns.z|length > 1 %}
{%- if loop.last %} and {% endif -%}
{% endif -%}
{{ x }}
{%- if ns.z|length > 2 %}
{%- if loop.index+1 < (ns.z|length) %}, {% endif -%}
{% endif -%}
{% endfor %}
{% else -%}
There is no rain forecast.
{% endif -%}