Allow URL query strings to /developer-tools/state to preset filters

Hi. I’d like to submit this as a feature request but I’m not sure whether it can be done already. I tried searching around and experimenting but had no joy.

So anyway I’ve got a custom sensor called “Sensors Unavailable” that counts the number of sensors whose state is currently ‘unavailable’. I’ve already got an attribute template to list which sensors are unavailable but it’s not a workable list, so I can’t click any of it - it’s just information.

What I was hoping I could do is click the lovelace sensor button I’ve created and navigate to the URL /developer-tools/state so I can see which sensors are unavailable. Instead of typing “unavailable” into the ‘Filter States’ column I was wondering whether I could pass in a query string in the URL to preset the filter when it loads up, e.g. /developer-tools/state?filter_states=unavailable.

That then would give me the information I was looking in a seamless manner. If such query strings were possible then the usefulness could be extended to preset other states or types of entities as well.

If you use either the entity filter card or custom auto-entities card they will return a list of clickable entities.

Screenshot_2020-11-06 Administration - Home Assistant

1 Like

Thanks @tom_l - the auto-entities card looks like a good workaround to my current problem and will be useful for some other ideas I have.

type: custom:auto-entities
show_empty: false
card:
  type: entities
  title: Unavailable
  show_header_toggle: false
filter:
  include:
    - state: "unavailable"

I had a quick look at the standard entity filter card but it looked like I had to include all of the entities I wanted to display - ouch!

I’m going to mark this as the solution as although it was a feature request for a different solution, it did actually solve the problem I had and is probably a better solution in that respect.

Yep that’s the disadvantage of the core card compared to the custom one.