#How to only show recorded entities in the History graph panel

1 messages · Page 1 of 1 (latest)

queen ore
#

Getting back to an older subject, which I had believed to be solved..... Using a manual History panel I like to add only the domain sensor entities. Added to that, I only want to see the recorded entities (because that is a mere fraction of my total entities I dont all want to see in history...)
Since core does Not offer any flexibility other than manually selecting entities, and not per domain selection (well, I could add 250 buttons with 'recorder' maybe...) I made an auto-entities card that selects the domains and feeds that to the history panel.

          - type: custom:config-template-card
            entities:
              - input_number.history_span
              - input_select.domain
            variables:
              span: states['input_number.history_span'].state
              domain: states['input_select.domain'].state
            card:
              type: custom:auto-entities
              card:
                type: history-graph
                hours_to_show: ${span}
              filter:
                include:
                  - domain: ${domain}

But, selecting domain sensor, now loads all sensor entities. I could have sworn it didn't do that before, because, why would it show unrecorded entities, there is no history of those in the system..

Back to the core history panel, I see the same, We see all sensor entities in the dropdown, and not only the recorded entities....Im sure it only showed available recorded entities at some point.

Was this changed and how/why. Does it have to do with the live history view. That could have changed things...
Secondly, and probably more importantly, how to only show recorded entities other than manually adding that label, and select based on the label....

queen ore
#

How to only show recorded entities in the History graph panel

past gulch
#

IIRC we tried to do this (only show recorded entities in the History dropdown) and released it for a month, but it had to be reverted again a few months later.
Frontend just doesn't know what is/isn't recorded.

queen ore
#

right, But I do think it worked, seem to remember it was reverted because of live history? Its a true bummer, because with near 3000 sensors, you can imagine the response on that. And I have less than 100 recorded, which was very smooth...

#

the now parked history-explorer-card did have that option, so somehow it must be doable

past gulch
#

I don't know what you mean when you say live history

#

I think the rub was entities that are technically recorded, but have no data points in the recorder (due to purge). Anything we did to filter out unrecorded entities would also remove those as well.

If I want to see the history of my smoke alarm sensor, it should be able to be selected, even if it hasn't had a fire in ~7 days.

queen ore
#

If I want to see the history of my smoke alarm sensor, it should be able to be selected, even if it hasn't had a fire in ~7 days.

sure, but you can only do that when the entity is recorded. That is not the issue is it? Not that is has no events, but that it is not recorded (as in excluded from recorder)

past gulch
#

The hypothetical sensor is recorded. But if it doesn't toggle in long enough it won't have any rows in the database.

queen ore
#

I dnt understand that. Are you telling me that my carefully curated include and exclude filters are useless? Are they recorded after all?

past gulch
#

No you're not understanding me.

queen ore
#

I dont think they are, because they show up blank in the History panel

#

so why show them at all

past gulch
#

The frontend does not know what entities are excluded for recorder vs which ones are not.

It can only know which sensors have data in the database and which ones don't.

Just because a sensor has no data in the database, does not mean that it is not recorded.

If we remove from the dropdown anything that does not have data in the database, we are also removing recorded entities from the dropdown that just happen to have no data.

queen ore
#

yes, but that is not what I am asking 😉 I am still talking functional requirements, not technical implementation.

#

Not saying: remove from the dropdown anything that does not have data in the database, but saying: prevent excluded entities from being presented to the user.

#

those are 2 different things...

past gulch
#

but saying: prevent excluded entities from showing in dropdown.

Sure I know that would be nice if we can do it, but I currently can't.

#

Nothing can tell me what those are.

queen ore
#

do you have any idea how History-explorer-card does is? Let me find that particular setting

past gulch
#

AFAIK it just downloads the entire history database and filters based on what has the data. I'm sure it doesn't solve the problem I was describing.

queen ore
#

By default the UI entity dropdown will list all entities known to HA. This can be a little overwhelming if you have lots. Alternatively the card can only list entities that are actually recorded and available in the database. Doing this will require a database access which can take a few seconds on larger installs. You can use the card normally while the list is loading in the background. The add entity list will become available as soon as the data is loaded. To turn on this mode use the following config in your YAML:

type: custom:history-explorer-card
recordedEntitiesOnly: true
queen ore