Hoping to get some guidance on making my logs a little less chatty for certain ERROR issues

Hello all,

Could someone here give me some guidance on achieving the subject with some of the issues in this ERROR Log post. I am aware of the logger functionality/ platform but I don’t understand how to use it in some specific instances just yet. In my instance I am using the following custom sensor (related to weatheralerts) and it looks like when it is in the “unavailable” state it is creating a huge number of ERRORs in the log. Could someone here show me how to filter these out.

Am I making a mistake by filtering these out? I don’t know much about programming but this seemed like a poor design to flood the logs like this when the primary component of an integration goes to unavailable (maybe it was a “have to” type situation for the developer though).

Here is a snippet of my logs:

2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: list object has no element 0 when rendering '{% if (states('sensor.weatheralerts') != 'unavailable') and (state_attr('sensor.weatheralerts', 'alerts')[0] != null) or ((states('sensor.weatheralerts') == 'unavailable') and (as_timestamp(state_attr('sensor.weatheralerts', 'alerts')[0].endsExpires) - as_timestamp(now()) > 0)) %}
on
{% else %}
off
{% endif %}'
2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('UndefinedError: list object has no element 0') while processing template 'Template("{% if (states('sensor.weatheralerts') != 'unavailable') and (state_attr('sensor.weatheralerts', 'alerts')[0] != null) or ((states('sensor.weatheralerts') == 'unavailable') and (as_timestamp(state_attr('sensor.weatheralerts', 'alerts')[0].endsExpires) - as_timestamp(now()) > 0)) %}
on
{% else %}
off
{% endif %}")' for attribute '_attr_native_value' in entity 'sensor.weatheralerts_alert_1'
2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].id }}
{% else %}
None
{% endif %}' but no default was specified') while processing template 'Template("{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].id }}
{% else %}
None
{% endif %}")' for attribute 'alert_id' in entity 'sensor.weatheralerts_alert_1'
2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].event }}
{% else %}
None
{% endif %}' but no default was specified') while processing template 'Template("{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].event }}
{% else %}
None
{% endif %}")' for attribute 'alert_event' in entity 'sensor.weatheralerts_alert_1'
2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].area }}
{% else %}
None
{% endif %}' but no default was specified') while processing template 'Template("{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].area }}
{% else %}
None
{% endif %}")' for attribute 'alert_area' in entity 'sensor.weatheralerts_alert_1'
2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].NWSheadline | regex_replace('\[\'','') | regex_replace('\'\]','') }}
{% else %}
None
{% endif %}' but no default was specified') while processing template 'Template("{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].NWSheadline | regex_replace('\[\'','') | regex_replace('\'\]','') }}
{% else %}
None
{% endif %}")' for attribute 'alert_NWSheadline' in entity 'sensor.weatheralerts_alert_1'
2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].description }}
{% else %}
None
{% endif %}' but no default was specified') while processing template 'Template("{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].description }}
{% else %}
None
{% endif %}")' for attribute 'alert_description' in entity 'sensor.weatheralerts_alert_1'
2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].messageType }}
{% else %}
None
{% endif %}' but no default was specified') while processing template 'Template("{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].messageType }}
{% else %}
None
{% endif %}")' for attribute 'alert_messageType' in entity 'sensor.weatheralerts_alert_1'
2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].status }}
{% else %}
None
{% endif %}' but no default was specified') while processing template 'Template("{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].status }}
{% else %}
None
{% endif %}")' for attribute 'alert_status' in entity 'sensor.weatheralerts_alert_1'
2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].category }}
{% else %}
None
{% endif %}' but no default was specified') while processing template 'Template("{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].category }}
{% else %}
None
{% endif %}")' for attribute 'alert_category' in entity 'sensor.weatheralerts_alert_1'
2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].urgency }}
{% else %}
None
{% endif %}' but no default was specified') while processing template 'Template("{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].urgency }}
{% else %}
None
{% endif %}")' for attribute 'alert_urgency' in entity 'sensor.weatheralerts_alert_1'
2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].severity }}
{% else %}
None
{% endif %}' but no default was specified') while processing template 'Template("{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].severity }}
{% else %}
None
{% endif %}")' for attribute 'alert_severity' in entity 'sensor.weatheralerts_alert_1'
2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].certainty }}
{% else %}
None
{% endif %}' but no default was specified') while processing template 'Template("{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].certainty }}
{% else %}
None
{% endif %}")' for attribute 'alert_certainty' in entity 'sensor.weatheralerts_alert_1'
2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].response }}
{% else %}
None
{% endif %}' but no default was specified') while processing template 'Template("{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].response }}
{% else %}
None
{% endif %}")' for attribute 'alert_response' in entity 'sensor.weatheralerts_alert_1'
2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].instruction }}
{% else %}
None
{% endif %}' but no default was specified') while processing template 'Template("{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].instruction }}
{% else %}
None
{% endif %}")' for attribute 'alert_instruction' in entity 'sensor.weatheralerts_alert_1'
2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].sent }}
{% else %}
None
{% endif %}' but no default was specified') while processing template 'Template("{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].sent }}
{% else %}
None
{% endif %}")' for attribute 'alert_sent' in entity 'sensor.weatheralerts_alert_1'
2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].effective }}
{% else %}
None
{% endif %}' but no default was specified') while processing template 'Template("{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].effective }}
{% else %}
None
{% endif %}")' for attribute 'alert_effective' in entity 'sensor.weatheralerts_alert_1'
2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].onset }}
{% else %}
None
{% endif %}' but no default was specified') while processing template 'Template("{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].onset }}
{% else %}
None
{% endif %}")' for attribute 'alert_onset' in entity 'sensor.weatheralerts_alert_1'
2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].expires }}
{% else %}
None
{% endif %}' but no default was specified') while processing template 'Template("{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].expires }}
{% else %}
None
{% endif %}")' for attribute 'alert_expires' in entity 'sensor.weatheralerts_alert_1'
2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].title }}
{% else %}
None
{% endif %}' but no default was specified') while processing template 'Template("{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].title }}
{% else %}
None
{% endif %}")' for attribute 'alert_title' in entity 'sensor.weatheralerts_alert_1'
2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].title }}
{% else %}
None
{% endif %}' but no default was specified') while processing template 'Template("{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].title }}
{% else %}
None
{% endif %}")' for attribute 'display_title' in entity 'sensor.weatheralerts_alert_1'
2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].zoneid }}
{% else %}
None
{% endif %}' but no default was specified') while processing template 'Template("{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].zoneid }}
{% else %}
None
{% endif %}")' for attribute 'alert_zoneid' in entity 'sensor.weatheralerts_alert_1'
2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{% if states.sensor.weatheralerts.attributes.alerts[0].NWSheadline != "null" %}
{{ states.sensor.weatheralerts.attributes.alerts[0].NWSheadline | regex_replace('\[\'','') | regex_replace('\'\]','') }}<br>
{% endif %}
<br>{{ states.sensor.weatheralerts.attributes.alerts[0].description | regex_replace('\n\n','<p>') | regex_replace('\n',' ') | regex_replace('\*','\n*') | regex_replace('<p>','\n\n') }}</ul><br>
{% if states.sensor.weatheralerts.attributes.alerts[0].instruction != None %}
{{ states.sensor.weatheralerts.attributes.alerts[0].instruction | regex_replace('\n\n','<p>') | regex_replace('\n',' ') | regex_replace('\*','\n*') | regex_replace('<p>','\n\n') }}<br>
{% endif %}
<br>Where : {{ state_attr('sensor.weatheralerts', 'friendly_name') }}
<br>Effective: {{ states.sensor.weatheralerts.attributes.alerts[0].effective }}
{%- if states.sensor.weatheralerts.attributes.alerts[0].ends != None %}
<br>Ends: {{ states.sensor.weatheralerts.attributes.alerts[0].ends }}
{%- endif %}
<br>Expires: {{ states.sensor.weatheralerts.attributes.alerts[0].expires }}
{% else %}
None
{% endif %}' but no default was specified') while processing template 'Template("{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{% if states.sensor.weatheralerts.attributes.alerts[0].NWSheadline != "null" %}
{{ states.sensor.weatheralerts.attributes.alerts[0].NWSheadline | regex_replace('\[\'','') | regex_replace('\'\]','') }}<br>
{% endif %}
<br>{{ states.sensor.weatheralerts.attributes.alerts[0].description | regex_replace('\n\n','<p>') | regex_replace('\n',' ') | regex_replace('\*','\n*') | regex_replace('<p>','\n\n') }}</ul><br>
{% if states.sensor.weatheralerts.attributes.alerts[0].instruction != None %}
{{ states.sensor.weatheralerts.attributes.alerts[0].instruction | regex_replace('\n\n','<p>') | regex_replace('\n',' ') | regex_replace('\*','\n*') | regex_replace('<p>','\n\n') }}<br>
{% endif %}
<br>Where : {{ state_attr('sensor.weatheralerts', 'friendly_name') }}
<br>Effective: {{ states.sensor.weatheralerts.attributes.alerts[0].effective }}
{%- if states.sensor.weatheralerts.attributes.alerts[0].ends != None %}
<br>Ends: {{ states.sensor.weatheralerts.attributes.alerts[0].ends }}
{%- endif %}
<br>Expires: {{ states.sensor.weatheralerts.attributes.alerts[0].expires }}
{% else %}
None
{% endif %}")' for attribute 'display_message' in entity 'sensor.weatheralerts_alert_1'
2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
Attention!!! Weather alert for {{ state_attr('sensor.weatheralerts', 'friendly_name') }}. A {{ states.sensor.weatheralerts.attributes.alerts[0].title }}. {{ states.sensor.weatheralerts.attributes.alerts[0].NWSheadline | regex_replace('\[\'','') | regex_replace('\'\]','') | capitalize }}.
{% else %}
None
{% endif %}' but no default was specified') while processing template 'Template("{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
Attention!!! Weather alert for {{ state_attr('sensor.weatheralerts', 'friendly_name') }}. A {{ states.sensor.weatheralerts.attributes.alerts[0].title }}. {{ states.sensor.weatheralerts.attributes.alerts[0].NWSheadline | regex_replace('\[\'','') | regex_replace('\'\]','') | capitalize }}.
{% else %}
None
{% endif %}")' for attribute 'spoken_title' in entity 'sensor.weatheralerts_alert_1'
2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].description | regex_replace('\n\n','<p>') | regex_replace('\n',' ') | regex_replace('\*','\n*') | regex_replace('<p>','\n\n') }}
{% if states.sensor.weatheralerts.attributes.alerts[0].instruction != None %}
{{ states.sensor.weatheralerts.attributes.alerts[0].instruction | regex_replace('\n\n','<p>') | regex_replace('\n',' ') | regex_replace('\*','\n*') | regex_replace('<p>','\n\n') }}
{% endif %}
{% else %}
None
{% endif %}' but no default was specified') while processing template 'Template("{% if states('sensor.weatheralerts')|int > 0 or (states('sensor.weatheralerts') == "unavailable" and states('sensor.weatheralerts_alert_1') == "on") %}
{{ states.sensor.weatheralerts.attributes.alerts[0].description | regex_replace('\n\n','<p>') | regex_replace('\n',' ') | regex_replace('\*','\n*') | regex_replace('<p>','\n\n') }}
{% if states.sensor.weatheralerts.attributes.alerts[0].instruction != None %}
{{ states.sensor.weatheralerts.attributes.alerts[0].instruction | regex_replace('\n\n','<p>') | regex_replace('\n',' ') | regex_replace('\*','\n*') | regex_replace('<p>','\n\n') }}
{% endif %}
{% else %}
None
{% endif %}")' for attribute 'spoken_message' in entity 'sensor.weatheralerts_alert_1'
2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: list object has no element 1 when rendering '{% if (states('sensor.weatheralerts') != 'unavailable') and (state_attr('sensor.weatheralerts', 'alerts')[1] != null) or ((states('sensor.weatheralerts') == 'unavailable') and (as_timestamp(state_attr('sensor.weatheralerts', 'alerts')[1].endsExpires) - as_timestamp(now()) > 0)) %}
on
{% else %}
off
{% endif %}'
2022-06-23 12:54:06 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('UndefinedError: list object has no element 1') while processing template 'Template("{% if (states('sensor.weatheralerts') != 'unavailable') and (state_attr('sensor.weatheralerts', 'alerts')[1] != null) or ((states('sensor.weatheralerts') == 'unavailable') and (as_timestamp(state_attr('sensor.weatheralerts', 'alerts')[1].endsExpires) - as_timestamp(now()) > 0)) %}

It would be better to fix the templates rather than hiding the errors.

I see you have opened an issue with the developer of that third party integration.

Wait for them to respond.

@tom_l Thank you for your response here.

I agree. Sadly, I’m a monkey and don’t have the skill set to do that.

I did.

Based on the other open tickets on that project, I get the feeling that may not happen but not 100% sure.

Essentially, I was just worried this wasn’t going to help the SD card. I believe it through 1600 logs in a short time period, blew my mind.

Thank you again for your response @tom_l