Entity Filter Card wildcards

hi folks

I have setup an Entity Filter card with a list of my steam wishlist (as per below). Is there a way to simply use a wildcard so that as I add/remove items from my steam wishlist, it will get automatically picked up by the card as a new sensor is created. i.e binary_sensor.steam_wishlist_*

type: entity-filter
entities:
  - binary_sensor.steam_wishlist_thehunter_call_of_the_wildtm_duck_and_cover_pack
  - binary_sensor.steam_wishlist_thehunter_call_of_the_wildtm_tents_ground_blinds
  - binary_sensor.steam_wishlist_thehunter_call_of_the_wildtm_weapon_pack_2
  - binary_sensor.steam_wishlist_thehunter_call_of_the_wildtm_weapon_pack_3
  - binary_sensor.steam_wishlist_thehunter_call_of_the_wildtm_medved_taiga
  - binary_sensor.steam_wishlist_thehunter_call_of_the_wildtm_new_species_2019
  - binary_sensor.steam_wishlist_thehunter_call_of_the_wildtm_trophy_lodge_spring_creek_manor
  - binary_sensor.steam_wishlist_thehunter_call_of_the_wildtm_wild_goose_chase_gear
  - binary_sensor.steam_wishlist_thehunter_call_of_the_wildtm_cuatro_colinas_game_reserve
  - binary_sensor.steam_wishlist_thehunter_call_of_the_wildtm_saseka_safari_trophy_lodge
  - binary_sensor.steam_wishlist_thehunter_call_of_the_wildtm_silver_ridge_peaks
  - binary_sensor.steam_wishlist_dayz
  - binary_sensor.steam_wishlist_tower_3d_pro
  - binary_sensor.steam_wishlist_tower_3d_pro_egkk_airport
state_filter:
  - 'True'
card: null
title: Wishlist on sale

thanks :slight_smile:

This may do what you want: https://github.com/thomasloven/lovelace-auto-entities

Hello

thank you for replying. I think I have installed the lovelace-auto-entities up correctly.

I created a card and put the following code in it

type: 'custom:auto-entities'
show_empty: false
card:
  type: entity-filter
  title: Steam Wishlist
filter:
  include:
    - entity_id: binary_sensor.steam_wishlist_*
  exclude:
    - state: 'False'

It displays the games on sale, but the card is red and gives an error of Incorrect filter config.

I don’t think you need the entity-filter card and auto-entities - you should be able to do everything with the latter. You’re getting that error because you haven’t provided the required filter for entity-filter card because you didn’t need it :slight_smile::

state_filter list REQUIRED

List of strings representing states or  `filter`  objects, see below. 

Here’s an example of one of my cards that uses a wildcard for the entity list and filters based on state:

                - type: 'custom:auto-entities'
                  filter:
                    include:
                      - entity_id: "binary_sensor.*_leak_detected"
                        state: 'on'
                  show_empty: false
                  card:
                    type: glance
                    title: Leaks!
                    show_state: false

Hi Rob,

thanks for taking time to reply. So I have tried your example but sadly still get an error.

regards
Darren

Ok, for those noobs out there like me, I finally got this work but slightly different code. So now it will only list those items in my wishlist that are on sale. Now just trying to work out if I can add the sale price :thinking:

type: 'custom:auto-entities'
show_empty: false
card:
  title: Steam Wishlist On Sale
  type: entities
filter:
  include:
    - entity_id: binary_sensor.steam_wishlist_*
  attributes:
    sale_price: null
  exclude:
    - state: 'False'
1 Like

Old topic I know! but after hours of trial and error, I came to a solution to my dynamic trash alert. It should only show the attribute ‘day’ contains ‘Vandaag’

how can i use the custom:auto-entities in the group like this:

group:
  # All Device in Wlan Entities
  all_device_wlan_entities:
    name: All Device in Wlan Entities
    filter:
      include:
        - entity_id: "switch.*_internet_access"

thanks

Anyone manage to change the name of the entity?

type: custom:auto-entities
filter:
  include:
    - entity_id: sensor.seventeentrack_package_*
      options:
        secondary_info: last-changed
        name: null
show_empty: false
card:
  type: entities
  title: Packages Status

This gives me:

Packages Status
Seventeentrack Package: ABCD1234     In Transit
Seventeentrack Package: ABCD1235     In Transit

But I would prefer having more detail:

Packages Status

ABCD1234     In Transit
Pre-Shipment, USPS Awaiting Item -> We were..

ABCD1235     In Transit
Pre-Shipment, USPS Awaiting Item -> We were..

I templated this in the following manner:

type: vertical-stack
cards:
  - type: custom:mushroom-title-card
    title: ''
  - type: custom:mushroom-template-card
    primary: Packages Status
    secondary: >-
      {% if states.sensor.seventeentrack_packages_in_transit.attributes.packages
      is not none and "unavailable" not in
      states("sensor.seventeentrack_packages_in_transit") %}

      {% for package in
      states.sensor.seventeentrack_packages_in_transit.attributes.packages %}

      {{ package.friendly_name }} - {{ package.tracking_number }}

      {{ package.info_text }}


      {% endfor %}

      {% endif %}
    icon: mdi:package-variant-closed
    fill_container: false
    multiline_secondary: true

But I cannot get The Tap Action to work with the template, so I’m looking for a way to access the attributes of filtered entities using auto-entities.