I just reverted, it was easier, below is my code. Now I have a question about display. What is the best way to have a card where I would click on the entity and go to itās info page?
sensor:
- platform: template
sensors:
unavailable_entities:
friendly_name: Unavailable Entities
unit_of_measurement: entities
icon_template: "{{ 'mdi:check-circle' if is_state('sensor.unavailable_entities','0') else 'mdi:alert-circle' }}"
value_template: >
{{ states|selectattr('state','in',['unavailable','unknown','none'])|rejectattr('domain','eq','group')
|rejectattr('entity_id','in',state_attr('group.ignored_entities','entity_id'))
|rejectattr('domain','eq','device_tracker')
|rejectattr('domain','eq','number')
|rejectattr('entity_id','search','camera.wyze_cam')
|rejectattr('entity_id','search','tessy_')
|rejectattr('entity_id','search','_do_not_disturb')
|rejectattr('entity_id','search','^(button|switch){1}(.octoprint_)\S+')
|rejectattr('entity_id','search','^(sensor)\S+(speaker_alarms|speaker_timers|display_alarms|display_timers|_estimated_distance)')
|list|count }}
attribute_templates:
entities: >
{{ states|selectattr('state','in',['unavailable','unknown','none'])|rejectattr('domain','eq','group')
|rejectattr('entity_id','in',state_attr('group.ignored_entities','entity_id'))
|rejectattr('domain','eq','device_tracker')
|rejectattr('domain','eq','number')
|rejectattr('entity_id','search','camera.wyze_cam_')
|rejectattr('entity_id','search','tessy_')
|rejectattr('entity_id','search','_do_not_disturb')
|rejectattr('entity_id','search','^(button|switch){1}(.octoprint_)\S+')
|rejectattr('entity_id','search','^(sensor)\S+(speaker_alarms|speaker_timers|display_alarms|display_timers|_estimated_distance)')
|map(attribute='entity_id')|list }}