[Under New Management] Interactive history explorer custom card

I didn’t find any info regarding this: is it possible that this card is usable only for admin users? I installed history card for non-admin user today and it seems that i can’t find any sensor with non-admin user in the card field.

The reason i created card for non-admin user is because i wanted to enable “more info” replacement, but it seems that this is enabled on user basis, correct? So each user must enable this functions, it’s not generally enabled for all… is there any other way to enable more-info replacement for other user(s)?

It is not only on user basis, but on user and device basis. Currently I don’t know a way to enable it in general. Or is the device perhaps not take the user into account? Perhaps try it.

1 Like

Aha… ok, good to know. It could be per device, but i can’t tell since i have a different user for each tablet, so i’ll try some various options and see. The main thing is that it could be done and that’s excellent.
Many thanks for this addon!

I need some feedback from you guys. I am currently finalizing the new y-axis interactivity on the card, allowing for a much more flexible handling of the Y axis scales. Notably blocking the current scale while scrolling and interactively panning and zooming the Y axis. Both are independent features, but they’re obviously connected.

First, you will be able to lock the current scale (whatever it might be) and keep exploring the chart using this scale. Auto scaling will be disabled while the lock is in effect. Click the lock to unlock it and return to auto scaling. This lock icon appears in line and bar charts.

image

Next, interactive Y-axis panning and zooming:

output

Holding SHIFT while panning will will unlock movement on the Y axis. Using the mouse wheel while holding SHIFT will zoom the Y-axis. Holding CTRL with the wheel will zoom the X-axis (time), as it did before. Moving or zooming the Y-axis will automatically lock the scale (or unlock ? See below !).

A few points I’m not too sure about right now:

  • On the first thought a lock icon seemed ideal for this - locking and unlocking a scale seemed intuitive and the icon is aesthetically pleasing. But is it really intuitive ? I’m not so sure anymore. What does locking mean in this context ? Does it mean you lock the Y axis to a temporary user-defined value (which is kept - locked - while scrolling), disabling the default scale or auto scale - or isn’t that an unlock instead ? You unlock the default limits and move it around at will ? Is the lock icon even the right choice for this ? My current take: UNSURE.

  • Should I allow the interactive pan and zoom of the y-axis even when a fixed scale was defined for the graph in the YAML (min/max) ? My current take: YES, it’s a temporary state anyway.

  • Related to above: if I allow Y-axis pan/zoom when the Y range is fixed in the YAML, should the panning be limited to the min/max range given in the YAML ? My current take: NO, panning should not be limited.

  • Currently the SHIFT key is used to make the individual sample points appear while its pressed. That was a kinda-undocumented feature (it’s not in the readme). The hotkey for this feature will have to move to a different key. Is that a problem ? Does anyone developed an irreversible muscle memory on the SHIFT key for showing samples or will moving it to the space bar do ? :slight_smile:

Any other feedback is welcome too. This is a pretty large and complex update. I’d like to get it right.

1 Like

These sound like great ideas, and something that I would use.

First bullet: To me, lock is correct as you suggested it. Lock means “doesn’t change” so when the scale doesn’t change (autoscaling is disabled) that should be the locked status. I presume that when you unlock the scaling, it would then jump to whatever the limits would have been if you had left lock off and panned to that point. By the way, autoscaling seems to be a little odd sometimes; it is possible to have a line that is almost flat against the bottom axis when panning. It seems like the scale is based on a wider range than is shown in the window, and that autoscale knows that there are some high values just outside the window and is taking them into account when determining the scale. This only seems to happen when panning, not when the graph is left alone.

Second bullet: Agree that pan & zoom should be allowed, and should override the YAML. If we are going to override a little of the YAML or scaling, then let us override all of it.

Third bullet: Same as above, don’t limit what we can do. We may come up with use cases you hadn’t thought of, or we may do something dumb, but let us control it and not the YAML.

Fourth bullet: Whatever you do should be documented. The shift key was an amusing find, but I don’t use it that much and could easily learn to use the space bar. Shift+scroll is somewhat intuitive since it is similar to control+scroll (although shift+scroll is not used in Windows to my knowledge), so use it for manual control.

Other: There should be some easy, intuitive, obvious way to get back to “normal”, or what the YAML says, or what it would look like if you had not messed with zooming and panning. In other words, a simple way to fix it when you mess up a graph with manual manipulation. Or in other words, a “reset” or “restore” button. Maybe something near the lock icon. I’m not sure what kind of icon represents “reset”, maybe a home. I suppose the escape key could be used, but an icon would be more obvious. Plus, if clicking and scrolling gets me in trouble, then I would look for something to click on to get out of trouble.

Thanks for your great work on this, and your continued efforts. It is WAY better than the standard graph.

PS: I still hope you consider the ability to have logarithmic Y scales as log-10 or log-2, settable in the YAML. Manual scaling helps this a lot, but it is still linear not logarithmic.

Great ideas.

To prevent possible confusion or incorrect assumptions, perhaps the lock should be named “scroll lock” (!) (in the documentation, tooltip, etc., if you’ll be able own and zoom otherwise with shift.

Given the new features, a reset button in case you’ve lost the plot (yup, it’s a pun) would be useful too. It would restore what you have as if you refreshed the whole page.

Not sure if this has been requested yet.

Would it be possible to add a way to remove individual entitles that are combined?
Currently if I want to remove an entity, I have to click the ‘X’ to remove all that are combined (see below picture), then re-add the ones I want to keep.Ex

Great new features to come! :slight_smile:

For the lock, I would show a set lock if autoscale if off, so locked to a defined range. This would fit to the rest as well. If defined in yaml, then autoscale is off and locked set. If not set in yaml, autoscale is on and lock off. If I disable a set lock it will redraw with autoscale. If I pan, it will switch to lock (until I remove it again).

Hi,
First of all thanks for this great custom card :slight_smile:

Is anyone aware if one of the following things are possible for curved lines

  • define faded fill colors?
  • add color_thresholds and opacity for specific values
  • specify different curve/fill colors for positive and negative values

Would love to create something like this …

But at this moment it looks like this …

Thanks!

Thanks for the feedback so far !

Yes exactly.

Yeah that’s how it works. It will determine autoscale from your current position to the previous and next cache boundaries. Which in practice is a 24h window around your position. The reason it does this is to smooth autoscale and provide hysteresis. If it only took the visible area, the scale would jump around like crazy. It does sometimes create somewhat strange situations, but that’s what the new lock thing is for.

That would be the lock icon. Basically that button toggles between ‘let the card manage the scale’ to ‘let me manage the scale manually’ and back. So if you’re lost in your graphs, just hit the button again and the autoscale (or the fixed YAML scale) will kick in.

It’s still on the backlog. I actually commented on the wrong issue on github and deleted my post when I realized, that’s probably why you got notified. But this still helped getting your feedback in this, so win win situation :wink:

Yes.

The problem with that is that the lock icon could not double as a reset button anymore then, that would get you back to the YAML defined limits after messing around with pan/zoom.

Yeah that’s an existing FR.

The positive / negative thing can be achieved by adding the same entity twice to the same graph, with different colors and a process function that cuts off the positive or negative parts respectively.

The other points are not possible and not really in scope for this card. This is mostly a productivity tool centered around providing functionality more than custom design. Features like fill gradients are not planned at this time and other graphing cards more targetted at making pretty charts are probably a better choice for this.

1 Like

Why?

I start wich yaml-value, lock is set. I start panning. Lock is not set anymore. I press lock set and it returns to yaml-values.

The problem is that these two contradict each other:

vs

Both autoscale and fixed YAML limits need the same icon state for this to work:

  • autoscale on: scale is controlles by the card, icon has state A
  • autoscale off, but fixed YAML limits: scale is still controlled by the card, icon also has state A.
  • panning and zooming around: scale is now user controlled, icon has state B. Autoscale is off, YAML limits are overridden.
  • user gets lost in the graph, clicks the icon, which reverts to state A and the scale is card controlled again (autoscale or YAML limits).

This shows how confusing the lock concept is. I think I need to use another icon to better represent the concept of card-controlled vs manually-controlled.

ow you are describing, it is too confusing for me and most probably too complicated. For me is should not show differentbehavior with same lock state.

I would suggest:

staring point:

  • no yaml min/max set: auto on, lock not set.
  • yaml min/max set, auto off, lock set

User is doing something:

  • if lock set (either manually or from yaml min/max) and he starts panning: auto still off, lock set
  • If I unlock lock manually, auto on (again)and auto is applied

This would IMHO be consistant in all cases - beside the yaml min/max case. But perhaps this is edge case an reload or lock unset/set-double-click to switch back to yaml/min-max.

OK, here’s another alternative which I think is pretty intuitive and doesn’t require adding more than one button. I haven’t tried this in code yet, so just a quick mockup.

When autoscale is on, a transparent (inactive) lock icon appears over the graph:
image

When you click or tap the icon, it becomes active and autoscale is disabled. The graph Y-scale is locked to whatever it was the moment you clicked the lock icon. You can now browse the history through time without autoscale, the Y scale being locked in place.
image

Click it again to disable the lock, turning autoscale back on. When a fixed range is defined in the YAML, this icon doesn’t appear at all.

When you start panning or zooming the Y-scale with SHIFT, from any mode, the icon will turn into a reset lock icon:
image

Clicking this will revert the scale to the card’s default, ie. either autoscale or YAML fixed range. The icon will then either switch back to the transparent lock (if autoscale is active) or disappear (if using fixed YAML scales).

Thoughts ?

2 Likes

Many thanks! That would solve my biggest problem … to have separated colors for negative and positive values. Many thanks for your support!

Like it. Can you perhaps directly align over the y axis labels, 14 in example above? Currently it looked like misplaced.

I have one problem with “history info panel” - wrong colors…
i use AMOLED Blue theme and in history unit numbers are dark grey and nearly impossible to see… is it possible to make them white?

See uicolors in docs:


  uiColors:
    gridlines: '#212121'
    labels: '#BAC0C6'
    buttons: '#2e2e2e'
    selector: '#2e2e2e'
    closeButton: '#2e2e2e'

You can set them for infopanel as well / have to define it there. Have a look at uimode: dark as well.