following up on Sensor - Unavailable/Offline Detection which I dont want to hijack any further with this ‘detail’ please have a look how I can ‘filter’ out entities in a template using a glob mask
this is what I have now:
{% set ignore_list = ['light.driveway','light.garden_backyard','light.garden_terrace',
'light.porch_outdoors'] if
is_state('binary_sensor.outside_daylight_sensor','on') else [] %}
{% set unavailable = states|selectattr('state','eq','unavailable')
|rejectattr('entity_id','in',state_attr('group.entity_blacklist','entity_id'))
|rejectattr('entity_id','in',ignore_list)
|rejectattr('domain','eq','media_player')
|map(attribute='entity_id')
|list %}
{{ unavailable|count }}
And I need to prevent the group of sensors made by my SolarEdge sensor of being included.
I can add these individually in my blacklist group or even in the verbose ignore_list, but would hope to use some filter in the template.
as said in the other thread, along the lines of
|rejectattr(‘object_id’,‘startswith’,‘solaredge’)
now I know this isn’t valid, but hope you can see what I am looking for.
thanks for having a look