Alerting configuration

Hey all,

i build a card, that would only show if specific criteria was met.
eg.

  • a door/window is open
  • a better is <15%
  • a radiator is on
  • pinter ink low
  • wifi signal on a device low
    etc…

its a really handy card for a snapshot into things, especially when going to bed or leaving the house

My question:
is there a way to make this easier to manage?
every time i add something with a new battery, its a pain to edit this card, rather then use a group or something somehow? i added a load of things to a group but it doesnt seem to work? do i need a group for each type (eg. batteries, doors, windows etc…) or will groups not help here as i need each individual value?

Even better, is there a way to make this dynamic, so that anything called “battery” or “contact” would appear in this alert card?

card:
  show_header_toggle: false
  title: Alerts
entities:
  - entity: binary_sensor.mps_bar_door_contact
    secondary_info: last-changed
  - entity: binary_sensor.mps_briony_office_window_contact
    secondary_info: last-changed
  - entity: binary_sensor.mps_dining_room_outside_door_contact
    secondary_info: last-changed
  - entity: binary_sensor.mps_downstairs_bathroom_window_contact
    secondary_info: last-changed
  - entity: binary_sensor.mps_en_suite_window_contact
    secondary_info: last-changed
  - entity: binary_sensor.mps_front_door_contact
    secondary_info: last-changed
  - entity: sensor.ssl_certificate_expiry
    secondary_info: last-changed
  - entity: sensor.mps_airing_cupboard_battery
    secondary_info: last-changed
  - entity: sensor.mps_bar_door_battery
    secondary_info: last-changed
  - entity: sensor.mps_briony_office_window_battery
    secondary_info: last-changed
  - entity: sensor.mps_dining_room_outside_door_battery
    secondary_info: last-changed
  - entity: sensor.mps_downstairs_bathroom_window_battery
    secondary_info: last-changed
  - entity: sensor.mps_en_suite_window_battery
    secondary_info: last-changed
  - entity: sensor.mps_front_door_battery
    secondary_info: last-changed
  - entity: sensor.neato_battery
    secondary_info: last-changed
  - entity: sensor.motion_sensor_downstairs_toilet_battery
    secondary_info: last-changed
  - entity: sensor.motion_sensor_kitchen_battery
    secondary_info: last-changed
  - entity: sensor.bar_sensor_motion_battery
    secondary_info: last-changed
  - entity: sensor.button_living_room_battery
    secondary_info: last-changed
  - entity: sensor.front_porch_inside_motion_sensor_battery
    secondary_info: last-changed
  - entity: sensor.front_porch_outdoor_sensor_motion_battery
    secondary_info: last-changed
  - entity: sensor.front_porch_outdoor_sensor_motion_battery
    secondary_info: last-changed
  - entity: sensor.ensuite_sensor_motion_battery
    secondary_info: last-changed
  - entity: sensor.study_plant_battery
    secondary_info: last-changed
  - entity: sensor.ring_downstairs_hallway_chime_wifi_signal_category
    secondary_info: last-changed
  - entity: sensor.ring_front_door_wifi_signal_category
    secondary_info: last-changed
  - entity: sensor.ring_rear_garden_wifi_signal_category
    secondary_info: last-changed
  - entity: sensor.ring_side_garage_wifi_signal_category
    secondary_info: last-changed
  - entity: sensor.ink_level_black
    secondary_info: last-changed
  - entity: sensor.ink_level_cyan
    secondary_info: last-changed
  - entity: sensor.ink_level_magenta
    secondary_info: last-changed
  - entity: sensor.ink_level_yellow
    secondary_info: last-changed
  - entity: sensor.radiator_status_bar
    secondary_info: last-changed
  - entity: sensor.radiator_status_bathroom
    secondary_info: last-changed
  - entity: sensor.radiator_status_bedroom
    secondary_info: last-changed
  - entity: sensor.radiator_status_briony_office
    secondary_info: last-changed
  - entity: sensor.radiator_status_en_suite
    secondary_info: last-changed
  - entity: sensor.radiator_status_guest_room
    secondary_info: last-changed
  - entity: sensor.radiator_status_gym
    secondary_info: last-changed
  - entity: sensor.radiator_status_hallway
    secondary_info: last-changed
  - entity: sensor.radiator_status_jamie_office
    secondary_info: last-changed
  - entity: sensor.radiator_status_kitchen
    secondary_info: last-changed
  - entity: sensor.radiator_status_landing
    secondary_info: last-changed
  - entity: sensor.radiator_status_livng_room
    secondary_info: last-changed
  - entity: sensor.hotwater_status
    name: Hotwater
    secondary_info: last-changed
show_empty: false
state_filter:
  - 'on'
  - unavailable
  - unknown
  - '20'
  - '15'
  - '14'
  - '13'
  - '12'
  - '11'
  - '10'
  - '9'
  - '8'
  - '7'
  - '6'
  - '5'
  - '4'
  - '3'
  - '2'
  - '1'
  - '0'
  - very_poor
  - okay
  - heating
type: entity-filter