What I’d like to do is perform another replace function to remove the period at the end of the string. I haven’t been able to figure out how to set the output as the value for another variable so I can perform another replace. And I’ve tried to replace using an array, but I don’t know what I’m doing and my syntax is bad. I’m sure there’s a cleaner way to do the multiple replace, but I’m not sure how to get it done.
It’s that easy, huh? Many thanks. This does what I want:
{% set desc = state_attr('sensor.pirate_weather_alerts', 'description') %}
{% set list = desc.split('*') %}
{{list[1].replace("WHAT...", "").replace(".","")}}