Ok I am really lost, I updated my unavailable entitys to below and it will not filter out using the searches. Any help would be great.
template:
- sensor:
- name: "Unavailable Entities"
unique_id: unavailable_entities
icon: "{{ iif(states(this.entity_id)|int(0) > 0,'mdi:alert-circle','mdi:check-circle') }}"
unit_of_measurement: entities
state: >
{% set entities = state_attr(this.entity_id,'entity_id') %}
{% if entities != none %} {{ entities|count }} {% endif %}
attributes:
entity_id: >
{% set ignore_seconds = 60 %}
{% set ignored = state_attr('group.ignored_entities','entity_id') %}
{% set ignore_ts = (now().timestamp() - ignore_seconds)|as_datetime %}
{% set entities = states|rejectattr('domain','eq','group')
|rejectattr('last_changed','ge',ignore_ts)
|selectattr('state','in',['unavailable','unknown'])
|rejectattr('entity_id','search','^(button|switch){1}(.octoprint_)\S+')
|rejectattr('entity_id','search','\S+tessy_\S*')
|rejectattr('entity_id','search','^(device_tracker)\S+')
|rejectattr('entity_id','search','^(camera\.wyze_cam)\S+')
|rejectattr('entity_id','search','^(sensor)\S+(speaker_alarms|speaker_timers|display_alarms|display_timers)')
%}
{% if ignored != none %}
{% set entities = entities|rejectattr('entity_id','in',ignored) %}
{% endif %}
{{ entities|map(attribute='entity_id')|list }}