dermotduffy / frigate-hass-card

A Lovelace card for Frigate in Home Assistant
MIT License
477 stars 53 forks source link

Make a Filter permanent, for example, only shows persons on a media library card on Homeassisntant #1455

Open victordariovera opened 2 weeks ago

victordariovera commented 2 weeks ago

Hi! It's not possible at all to fix a filter configuration, for example, to show a frigate card showing only persons.

Describe the solution you'd like A yaml card configuration to set up a permanent filter, for example show only persons

Describe alternatives you've considered An option on GUI to adjust the permanent filter

Additional context I'd tried in multiple ways to fix a filter configuration in the card by labels.

patienttruth commented 2 weeks ago

This is not exactly what you're asking for, but perhaps is satisfactory solution. I searched for filter on the docs page and found: https://github.com/dermotduffy/frigate-hass-card?tab=readme-ov-file#camera-frigate-configuration

It looks like you can set a limit to what the card shows in the YAML.

cameras:
  - camera_entity: camera.frigate_lorex_01_gate
    dependencies:
      cameras:
        - camera.frigate_lorex_02_turnaround
    frigate:
      labels:
        - person
  - camera_entity: camera.frigate_lorex_02_turnaround

incidentally, the "dependency" entry is one that I learned when looking for a similar solution to my use case of preserving the camera filter which shows two cameras. I ended up making one card for each side of the house which lists a primary camera, and a secondary camera as a dependency. The default view is clips. It shows the clip thumbnails for the two cameras mixed together and sorted by time.