[Under New Management] Interactive history explorer custom card

What is the state of your sensors when they go unavailable ? Export a short time period as a csv and check the sensor states to be sure.

`combineSameUnits’ is a whole card setting I’m afraid.

For the one I checked, it seems to go unavailable. Here are three entries from the CSV file:

2023-05-19 06:00:19	4.56
2023-05-19 06:00:55	unavailable
2023-05-19 06:39:48	4.85

and a screenshot of the built in history graph:

You need to set showUnavailable: true, otherwise the card will interpolate over the missing parts.

See the relevant part in the docs here.

:sob: what a pity. Chance to have it globally and overwrite per graph in the far future?

That did it. I swear I read that chunk of docs like five times. I think my brain just couldn’t make the leap to showUnavailable as true meaning something wouldn’t be shown.

I agree that showUnavailable (as in show the unavailable state ; rather than don’t show it - by interpolating over it) is a really confusing setting name. I should have probably picked something more descriptive. Oh well.

Maybe :slight_smile: This would only affect dynamically added entities (YAML ones allow explicit grouping control anyway), so it would have to go into ‘entityOptions’ and it would be per entity (or domain, class, etc). If present, the setting would override the global one. Should be rather trivial to add. Please add an FR.

2 Likes

Will do so But I though more about a graph option, e.g.

type: custom:history-explorer-card
cardName: advanced-history
combineSameUnits: false
graphs:
  - type: line
    options:
      combineSameUnits: false
      ymin: -10
      ymax: 30
    entities:
      - entity: sensor.outside_temperature
        color: '#3e95cd'
        fill: rgba(151,187,205,0.15)
        width: 4
        lineMode: stepped
      - entity: sensor.annexe_temperature
        color: '#ee3452'
        fill: rgba(0,0,0,0)
        lineMode: lines
  - type: line
    options:
      combineSameUnits: true
    entities:
      - entity: sensor.outside_pressure
        color: --my-special-green
        fill: rgba(151,205,187,0.15)

So ofc the option in first graph would not be needed, because of global setting but for sake of completeness I have added them as example, nevertheless.

Because per entity could be an idea as well ofc, but in my cases it depends on more usecases, where it is not related to the entity but to whatever reasons. Think about temperature entities. I don’t want combine in some dashboard entites, where the average is 2 and on another 20, because I can’t see spikes, etc. But I want combine some which have all average of 20. So I would define two graphs (in one card) like above. One would combine and the other wouldn’t.

I’m not sure I understand ? Why would you need this option for manually defined YAML graphs ? The global combineSameUnits doesn’t have any effect on them, it’s for dynamically added entities only. You already have full control over what and how you combine things in manual YAML. That option is to control combining entities for when you don’t have that level of control (ie. for dynamically added ones).

1 Like

You are right. I came from one of my examples, where most of them are added dynamically, but I thought, that they were defined in yaml and that some of them were combined, where I don’t want this. Therefor I thought, that they were combined because of combineSameUnits.

Just forget my last post. :rofl:

Hah :wink:

Allowing combineSameUnits to be set per-entity/domain/etc is still a good idea. It would allow more fine tuned control over the grouping behavior while using dynamically added entities.

I would dearly love to be able to populate this fantastic graph card with an entity list generated by Thomas’s Auto-Entities card.

Has anyone discovered a solution to achieve this yet?

This Card is just awesome! Wondering how i could miss that great Piece of Bytes for so long :sunglasses:
However, after playing around with it for a couple of Days and reading the doc, i still couldn’t solve some tasks:

  • (How) can i preconfigure a specific entity to be displayed in weekly Intervals? I found the Settings (interval: daily) and monthly working, but both don’t fit my Usecase. Just using week/weekly unfortunatly doesn’t work
  • (How) can i hide the Y-Axis-scaling Lock? I want to keep Autoscaling always active and prevent locking, and for a cleaner Look completely hide it
  • (How) can i display a static value over the whole Graph? I just want to draw a horizontal Line to represent the actual Average of a whole Year, making it visually easy to see, if the usage was above or below the avg
  • Weekly interval is not (yet) supported. Just the ones you see in the UI. Might be added in the next release.

  • There is no built-in way to micro-manage the look of the card like this, but you should be able to hide it using card-mod.

  • Use a dummy sensor (just use the same you’re actually graphing) and force its value to your fixed value using a process function:

graphs:
  - type: line
    entities:
      - entity: sensor.outside_temperature
        color: '#3e95cd'
        fill: rgba(151,187,205,0.15)
      - entity: sensor.outside_temperature
        color: red
        fill: rgba(0,0,0,0)
        process: (15.0)
        name: '15 degree threshold line'
1 Like

Great! Thanks for getting back, highly appreciated!
I thought of Card-Mod, just trying to avoid tampering whenever possible. Will have a look.
If the Intervals manually selectable would become predefinable in yaml would be awesome!
The Process-Function is Great, too bad i overlooked it, thanks for pointing me to that direction!

This Card is really awesome Work! :+1:

Just to clear that up, the interval is currently predefinable in the yaml. It’s just that weekly isn’t supported at this time.

Trying this out for solar generation tracking. I have two CT clamps which are on separate devices, and an overall figure which is on a third device. When I add the entities they show up on three separate graphs. If I add the same ones in a regular history graph they’re all overlaid on the one graph - this is what I want so I can compare output of each against each other.
is there a way to do that with this card, or does it automatically spawn a new graph for each device?

It would be a good idea to check the docs at:

It contains the answer to your question, which is:

combineSameUnits: true

Thanks - didn’t realise it needing yaml editing - shoudl have checked.

edit: really dumb question - where do I need to put the yaml?

Hi Alex, I’m having the same issue. Empty cards on mobile phone but working great on the web version.
I can even add entities in mobile, that won’t show on the web. So I have 2 history cards with same id but completely out of sync.