[Under New Management] Interactive history explorer custom card

Because I like it the way it currently behaves. What may be ‘obvious’ behavior for one user may be completely counterintuitive to another.

I’m always open to make this card more adaptable for uses that differ from mine and that’s what FRs are for. So I suggest you open one (or add constructive criticism to an existing one) rather than complaining about how obvious things are to you. Or even better, why not adding this feature yourself and submitting a PR ?

It is currently zooming centered, isn’t it? I like the current behavior as well.

@ the others: You can CTRL-mouse wheel zoom as well. And this is then zooming on place of mouse postion.

Yeah it’s centered. I personally find the concept of zooming to a left/right border pretty weird, unless this would only apply to the situation where the right side border corresponds to the current time. Which again opens a can of worms about consistency. Having a same function behave differently depending on non-obvious parameters (the scroll position in this case) is really confusing and bad UX.

I’m very sorry to have annoyed you Alex, I should have been more diplomatic!
You’ve said “unless this would only apply to the situation where the right side border corresponds to the current time” - that is exactly what I would like to see and makes complete sense to me.

But how would you the zoom centered if you are by chance just at the right side border? If it would zoom centered everywhere minus this edge case and I expect that it is doing so everywhere and then it is by chance zooming somewhere else, this would seem to me confusion.

I believe the point is that it’s not an edge case.

Of course others could have a different idea of where the edges should be but I also think most users would intuitively think that when you change the zoom/range level from the drop down the graph would zoom to that level with the far right border being ‘now’ just like it does when the graph is first opened.

the inconsistency (and hence confusion) lies in the fact that the graph doesn’t open in the middle of the range when it’s first opened but instead opens so that the right border is ‘now’ as expected. then when the range is changed it unexpectedly jumps to the new zoom level in the middle of the last range where the graph was.

if you are at a scroll position where the right side border isn’t at ‘now’ then the current functionality makes sense and should be expected. but if the right border is currently at ‘now’ then when the zoom level is changed the right border should be kept locked to ‘now’ unless the user has scrolled somewhere else.

of course it’s not my plugin and I’m at the mercy of the developer and will accept the functionality as is since the card is already way better than the built-in graph. So I do appreciate the work and the availability.

2 Likes

So the zoom function would behave one way when the scroll position is exactly at one very specific point in time and in a completely different way in all other cases. That sounds extremely unintuitive. I mean, this ‘right border’ behavior would only really work right after opening the card or after clicking the date button, as you could never manually scroll to the now date accurately enough, especially since the now date changes all the time. It would also require auto-refresh to be enabled.

I’m honestly quite puzzled how any of that would be desirable or even ‘obvious’. It sounds super obscure and a pain to use. I can see that some people may prefer having a zoom reference point other than the center, but then it should consistently use that regardless of scroll position.

2 Likes

You have repeated your explanation but not answered my question, how would you then zoom centered if you are by chance just at the right side border?

I guess I don’t understand the question.

If you are at the right end (now) why would you need to zoom to the center? Wouldn’t that just put ‘now’ at the center of the graph with no data to the right (because that would be in the future).

it already does something like that now and I find that strange since there is no data to look at there. I would think trying to scroll forward past now would lock the right border at the now time.

image

IMHO, I think people would expect that behavior if they had manually scrolled away from the right border position. But if there was no scrolling then I think that most would expect the right side to stay at now.

even if a manual refresh of the graph was needed to truly get to the now point I still think it makes sense and would be expected by users.

I’ll apologize for any ruckus I’ve caused by bringing this up. I never would have thought the subject would have become so contentious. I really thought I was being helpful.

it’s fine the way it is. It’s just a quirk that needs getting used to.

It’s very hard to know what ‘most’ users expect. Companies with very deep pockets spend hundred of millions on UX research and analytics and mostly still get it wrong. I understand that you consider the current behavior as quirky and prefer the other one. But inferring from your own personal preference to more general user preference is a very big leap. This card has thousands of users. This right edge zoom behavior has been requested by two users. Not trying to downplay your preferences (UX is very subjective after all), but this request here is a total niche thing.

I really really hate graphing tools that do this, also more generally outside of the HA ecosystem. I never understood why some would impose this arbitrary limitation. I often put the now date in the center so I can observe values as they are being added without the card scrolling and without having to glance at the very edge of the graph for changes.

Anyway. I think everyone has made their points about this feature here. On my side, I am not going to implement this, due to the inconsistency it would introduce. Now, if people would prefer more options for fixed reference points when zooming over the toolbar buttons (ie. left or right edge rather than center), then this is something that could be added as a yaml setting. If this is something you would like to see, please open an FR to track this.

2 Likes

Export Statistics as CSV does not work, it works only with export as CSV:

I have two cards, that should export statistics as CSV per day. One card exports statistics hourly, the 2. card has an empty CSV file. Both cards export CSV correct, but with all data ( about all 5 minutes)

Here is the card an the results:

type: custom:history-explorer-card
csv:
  statisticsPeriod: day
cardName: historycard-40273312
header: Stromzähler Grid
statistics:
  enabled: true
graphs:
  - type: line
    entities:
      - entity: sensor.zaehlerschrank_total_in

exported CSV:

Time stamp,State
sensor.zaehlerschrank_total_in
2023-08-05 20:04:03,28181.7
2023-08-05 23:42:39,unavailable
2023-08-05 23:42:41,unknown
2023-08-05 23:42:42,28198.53
2023-08-05 23:46:51,unavailable
2023-08-05 23:46:52,unknown
2023-08-05 23:46:53,28198.56
2023-08-05 23:51:42,28198.6
2023-08-05 23:56:42,28198.64
2023-08-06 00:01:42,28198.67
2023-08-06 00:06:42,28198.71
2023-08-06 00:11:42,28198.74
2023-08-06 00:16:42,28198.78
2023-08-06 00:21:42,28198.81
2023-08-06 00:26:42,28198.84
2023-08-06 00:31:42,28198.87
2023-08-06 00:36:42,28198.91
2023-08-06 00:41:42,28198.95
2023-08-06 00:46:42,28198.99
2023-08-06 00:51:42,28199.02
2023-08-06 00:56:42,28199.05
2023-08-06 01:01:42,28199.08
2023-08-06 01:06:42,28199.1
2023-08-06 01:11:42,28199.13
2023-08-06 01:16:42,28199.16
2023-08-06 01:21:42,28199.19
2023-08-06 01:26:42,28199.22
2023-08-06 01:31:42,28199.25
2023-08-06 01:36:42,28199.28
2023-08-06 01:41:42,28199.32
2023-08-06 01:46:42,28199.35
2023-08-06 01:51:42,28199.38
2023-08-06 01:56:42,28199.42
2023-08-06 02:01:42,28199.46
2023-08-06 02:06:42,28199.5
2023-08-06 02:11:42,28199.53
2023-08-06 02:16:42,28199.57
2023-08-06 02:21:42,28199.6
2023-08-06 02:26:42,28199.64
2023-08-06 02:31:42,28199.86
2023-08-06 02:35:42,unavailable
2023-08-06 02:35:42,28199.86
2023-08-06 02:35:43,28200.06
2023-08-06 02:36:42,28200.1
2023-08-06 02:41:42,28200.3
2023-08-06 02:46:42,28200.33
2023-08-06 02:51:42,28200.36
2023-08-06 02:56:42,28200.38
2023-08-06 03:01:42,28200.41
2023-08-06 03:06:42,28200.44
2023-08-06 03:11:42,28200.47
2023-08-06 03:16:42,28200.5
2023-08-06 03:21:42,28200.53
2023-08-06 03:26:42,28200.55
2023-08-06 03:31:42,28200.58
2023-08-06 03:36:42,28200.61
2023-08-06 03:41:42,28200.64
2023-08-06 03:46:42,28200.67
2023-08-06 03:51:42,28200.7
2023-08-06 03:56:42,28200.72
2023-08-06 04:01:42,28200.75
2023-08-06 04:06:42,28200.78
2023-08-06 04:11:42,28200.81
2023-08-06 04:16:42,28200.85
2023-08-06 04:21:42,28200.88
2023-08-06 04:26:42,28200.91
2023-08-06 04:31:42,28200.94
2023-08-06 04:36:42,28200.96
2023-08-06 04:41:42,28200.99
2023-08-06 04:46:42,28201.02
2023-08-06 04:51:42,28201.06
2023-08-06 04:56:42,28201.09
2023-08-06 05:01:42,28201.13
2023-08-06 05:06:42,28201.16
2023-08-06 05:11:42,28201.19
2023-08-06 05:16:42,28201.23
2023-08-06 05:21:42,28201.27
2023-08-06 05:26:42,28201.3
2023-08-06 05:31:42,28201.33
2023-08-06 05:36:42,28201.37
2023-08-06 05:41:42,28201.4
2023-08-06 05:46:42,28201.43
2023-08-06 05:51:42,28201.46
2023-08-06 05:56:42,28201.49
2023-08-06 06:01:42,28201.53
2023-08-06 06:06:42,28201.56
2023-08-06 06:11:42,28201.59
2023-08-06 06:16:42,28201.62
2023-08-06 06:21:42,28201.65
2023-08-06 06:26:42,28201.68
2023-08-06 06:31:42,28201.72
2023-08-06 06:35:40,unavailable
2023-08-06 06:35:41,unknown
2023-08-06 06:35:42,28201.75
2023-08-06 06:36:42,28201.76
2023-08-06 06:41:42,28201.8
2023-08-06 06:46:42,28201.85
2023-08-06 06:51:42,28201.9
2023-08-06 06:56:42,28201.96
2023-08-06 07:01:42,28202.02
2023-08-06 07:06:42,28202.08
2023-08-06 07:11:42,28202.13
2023-08-06 07:16:42,28202.18
2023-08-06 07:21:42,28202.22
2023-08-06 07:26:42,28202.26
2023-08-06 07:31:42,28202.31
2023-08-06 07:36:42,28202.35
2023-08-06 07:41:42,28202.52
2023-08-06 07:46:42,28202.9
2023-08-06 07:51:42,28203.14
2023-08-06 07:56:42,28203.3
2023-08-06 08:01:42,28203.43
2023-08-06 08:06:42,28203.47
2023-08-06 08:11:42,28203.51
2023-08-06 08:16:42,28203.55
2023-08-06 08:21:42,28203.59
2023-08-06 08:26:42,28203.63
2023-08-06 08:31:42,28203.66
2023-08-06 08:36:42,28203.71
2023-08-06 08:38:27,unavailable
2023-08-06 08:38:27,28203.71
2023-08-06 08:38:28,28203.73
2023-08-06 08:41:42,28203.75
2023-08-06 08:46:42,28203.8
2023-08-06 08:51:42,28203.84
2023-08-06 08:56:42,28203.88
2023-08-06 09:01:42,28203.92
2023-08-06 09:06:42,28203.96
2023-08-06 09:11:42,28203.99
2023-08-06 09:16:42,28204.03
2023-08-06 09:21:42,28204.06
2023-08-06 09:26:42,28204.11
2023-08-06 09:31:42,28204.15
2023-08-06 09:36:42,28204.2
2023-08-06 09:41:42,28204.25
2023-08-06 09:46:42,28204.3
2023-08-06 09:51:42,28204.35
2023-08-06 09:56:42,28204.41
2023-08-06 10:01:42,28204.46
2023-08-06 10:06:42,28204.51
2023-08-06 10:11:42,28204.56
2023-08-06 10:16:42,28204.61
2023-08-06 10:21:42,28204.65
2023-08-06 10:26:42,28204.7
2023-08-06 10:31:42,28204.75
2023-08-06 10:36:42,28204.8
2023-08-06 10:41:42,28204.85
2023-08-06 10:46:42,28204.89
2023-08-06 10:51:42,28204.93
2023-08-06 10:56:42,28204.98
2023-08-06 11:01:42,28205.03
2023-08-06 11:06:42,28205.07
2023-08-06 11:11:42,28205.14
2023-08-06 11:16:42,28205.26
2023-08-06 11:21:42,28205.36
2023-08-06 11:26:42,28205.47
2023-08-06 11:31:42,28205.57
2023-08-06 11:36:42,28205.78
2023-08-06 11:41:42,28206.13
2023-08-06 11:46:42,28206.46
2023-08-06 11:51:42,28206.67
2023-08-06 11:56:42,28206.75
2023-08-06 12:01:42,28206.83
2023-08-06 12:06:42,28206.95
2023-08-06 12:11:42,28207.09
2023-08-06 12:16:42,28207.48
2023-08-06 12:21:42,28207.79
2023-08-06 12:26:42,28208.0
2023-08-06 12:31:42,28208.2
2023-08-06 12:36:42,28208.39
2023-08-06 12:41:42,28208.68
2023-08-06 12:46:42,28209.12
2023-08-06 12:51:42,28209.23
2023-08-06 12:56:42,28209.29
2023-08-06 13:01:42,28209.35
2023-08-06 13:06:42,28209.4
2023-08-06 13:11:42,28209.45
2023-08-06 13:16:42,28209.49
2023-08-06 13:21:42,28209.54
2023-08-06 13:26:42,28209.61
2023-08-06 13:31:42,28209.65
2023-08-06 13:36:42,28209.7
2023-08-06 13:41:42,28209.75
2023-08-06 13:46:42,28209.81
2023-08-06 13:51:42,28209.86
2023-08-06 13:56:42,28209.91
2023-08-06 14:01:42,28209.96
2023-08-06 14:06:42,28209.99
2023-08-06 14:11:42,28210.04
2023-08-06 14:16:42,28210.07
2023-08-06 14:21:42,28210.1
2023-08-06 14:26:42,28210.14
2023-08-06 14:31:42,28210.17
2023-08-06 14:36:42,28210.21
2023-08-06 14:41:20,unavailable
2023-08-06 14:41:20,28210.21
2023-08-06 14:41:21,28210.24
2023-08-06 14:46:42,28210.28
2023-08-06 14:51:42,28210.31
2023-08-06 14:56:42,28210.34
2023-08-06 15:01:42,28210.37
2023-08-06 15:06:42,28210.41
2023-08-06 15:11:42,28210.45
2023-08-06 15:16:42,28210.49
2023-08-06 15:21:42,28210.54
2023-08-06 15:26:42,28210.6
2023-08-06 15:31:42,28210.65
2023-08-06 15:36:42,28210.71
2023-08-06 15:41:42,28210.76
2023-08-06 15:46:42,28210.81
2023-08-06 15:51:42,28210.86
2023-08-06 15:56:42,28210.9
2023-08-06 16:01:42,28210.94
2023-08-06 16:06:42,28210.97
2023-08-06 16:11:42,28211.01
2023-08-06 16:16:42,28211.05
2023-08-06 16:21:42,28211.08
2023-08-06 16:26:42,28211.13
2023-08-06 16:31:42,28211.18
2023-08-06 16:36:42,28211.23
2023-08-06 16:41:42,28211.28
2023-08-06 16:46:42,28211.32
2023-08-06 16:51:42,28211.37
2023-08-06 16:56:42,28211.41
2023-08-06 17:01:42,28211.46
2023-08-06 17:06:42,28211.5
2023-08-06 17:11:42,28211.55
2023-08-06 17:16:42,28211.61
2023-08-06 17:21:42,28211.66
2023-08-06 17:26:42,28211.71
2023-08-06 17:31:42,28211.75
2023-08-06 17:36:42,28211.79
2023-08-06 17:41:42,28211.83
2023-08-06 17:46:42,28211.87
2023-08-06 17:51:42,28211.92
2023-08-06 17:56:42,28211.96
2023-08-06 18:01:42,28212.0
2023-08-06 18:06:42,28212.04
2023-08-06 18:11:42,28212.08
2023-08-06 18:16:42,28212.13
2023-08-06 18:21:42,28212.38
2023-08-06 18:26:42,28212.65
2023-08-06 18:31:42,28212.87
2023-08-06 18:36:42,28212.92
2023-08-06 18:41:42,28212.96
2023-08-06 18:46:42,28213.01
2023-08-06 18:51:42,28213.05
2023-08-06 18:56:42,28213.09
2023-08-06 19:01:42,28213.14
2023-08-06 19:06:42,28213.19
2023-08-06 19:11:42,28213.25
2023-08-06 19:16:42,28213.31
2023-08-06 19:21:42,28213.37
2023-08-06 19:22:34,unavailable
2023-08-06 19:22:35,unknown
2023-08-06 19:22:37,28213.38
2023-08-06 19:26:42,28213.43
2023-08-06 19:31:42,28213.49
2023-08-06 19:36:42,28213.55
2023-08-06 19:39:32,unavailable
2023-08-06 19:39:33,unknown
2023-08-06 19:39:34,28213.58
2023-08-06 19:41:42,28213.61

Export Statistic as CSV:

Time stamp,State,Mean,Min,Max

Here is the 2. card:

type: custom:history-explorer-card
cardName: historycard-40273312
statisticsPeriod: day
header: Wärmepumpe Shelly 3em
statistics:
  enabled: true
graphs:
  - type: line
    entities:
      - entity: sensor.warmepumpe_energiezahler
        color: green

Exported CSV:

Time stamp,State
sensor.warmepumpe_energiezahler
2023-08-06 00:00:00,15.08
2023-08-06 00:02:05,15.09
2023-08-06 00:03:11,15.1
2023-08-06 00:08:08,15.11
2023-08-06 00:12:32,15.12
2023-08-06 00:17:29,15.13
2023-08-06 00:27:23,15.14
2023-08-06 00:37:17,15.15
2023-08-06 00:48:17,15.16
2023-08-06 00:59:17,15.17
2023-08-06 01:10:17,15.18
2023-08-06 01:20:11,15.19
2023-08-06 01:31:11,15.2
2023-08-06 01:42:11,15.21
2023-08-06 01:50:26,15.22
2023-08-06 01:54:17,15.23
2023-08-06 01:59:14,15.24
2023-08-06 02:00:20,15.25
2023-08-06 02:03:05,15.26
2023-08-06 02:08:02,15.27
2023-08-06 02:12:26,15.28
2023-08-06 02:21:14,15.29
2023-08-06 02:27:17,15.3
2023-08-06 02:28:23,15.33
2023-08-06 02:29:29,15.38
2023-08-06 02:30:02,15.42
2023-08-06 02:31:08,15.46
2023-08-06 02:32:14,15.51
2023-08-06 02:33:20,15.55
2023-08-06 02:34:26,15.6
2023-08-06 02:35:32,15.64
2023-08-06 02:36:05,15.68
2023-08-06 02:37:11,15.73
2023-08-06 02:38:17,15.77
2023-08-06 02:39:23,15.82
2023-08-06 02:40:29,15.86
2023-08-06 02:41:02,15.89
2023-08-06 02:45:26,15.9
2023-08-06 02:54:14,15.91
2023-08-06 03:05:14,15.92
2023-08-06 03:16:14,15.93
2023-08-06 03:26:08,15.94
2023-08-06 03:37:08,15.95
2023-08-06 03:48:08,15.96
2023-08-06 03:59:08,15.97
2023-08-06 04:03:42,unavailable
2023-08-06 04:04:15,15.97
2023-08-06 04:09:12,15.98
2023-08-06 04:20:12,15.99
2023-08-06 04:23:30,16.0
2023-08-06 04:31:12,16.01
2023-08-06 04:41:06,16.02
2023-08-06 04:52:06,16.03
2023-08-06 05:03:06,16.04
2023-08-06 05:13:33,16.05
2023-08-06 05:22:21,16.06
2023-08-06 05:32:15,16.07
2023-08-06 05:42:09,16.08
2023-08-06 05:52:03,16.09
2023-08-06 06:02:30,16.1
2023-08-06 06:11:18,16.11
2023-08-06 06:21:12,16.12
2023-08-06 06:31:06,16.13
2023-08-06 06:35:39,unknown
2023-08-06 06:35:45,16.13
2023-08-06 06:41:26,16.14
2023-08-06 06:50:14,16.15
2023-08-06 06:53:32,16.16
2023-08-06 06:54:05,16.17
2023-08-06 06:59:02,16.18
2023-08-06 07:03:26,16.19
2023-08-06 07:08:23,16.2
2023-08-06 07:12:14,16.21
2023-08-06 07:16:15,unavailable
2023-08-06 07:16:48,16.21
2023-08-06 07:21:12,16.22
2023-08-06 07:31:06,16.23
2023-08-06 07:40:27,16.24
2023-08-06 07:50:21,16.25
2023-08-06 07:59:09,16.26
2023-08-06 08:09:03,16.27
2023-08-06 08:19:30,16.28
2023-08-06 08:29:24,16.29
2023-08-06 08:39:18,16.3
2023-08-06 08:49:12,16.31
2023-08-06 08:55:15,16.32
2023-08-06 09:00:12,16.33
2023-08-06 09:04:13,unavailable
2023-08-06 09:04:46,16.34
2023-08-06 09:09:10,16.35
2023-08-06 09:13:01,16.36
2023-08-06 09:18:31,16.37
2023-08-06 09:23:28,16.38
2023-08-06 09:27:19,16.39
2023-08-06 09:37:13,16.4
2023-08-06 09:46:01,16.41
2023-08-06 09:56:28,16.42
2023-08-06 10:06:22,16.43
2023-08-06 10:16:16,16.44
2023-08-06 10:19:01,16.45
2023-08-06 10:26:10,16.46
2023-08-06 10:36:04,16.47
2023-08-06 10:46:31,16.48
2023-08-06 10:55:19,16.49
2023-08-06 11:00:16,16.5
2023-08-06 11:04:07,16.51
2023-08-06 11:09:04,16.52
2023-08-06 11:13:28,16.53
2023-08-06 11:17:19,16.54
2023-08-06 11:22:16,16.55
2023-08-06 11:28:19,16.56
2023-08-06 11:34:22,16.58
2023-08-06 11:35:28,16.61
2023-08-06 11:36:01,16.66
2023-08-06 11:37:07,16.7
2023-08-06 11:38:13,16.74
2023-08-06 11:39:19,16.79
2023-08-06 11:40:25,16.83
2023-08-06 11:41:31,16.89
2023-08-06 11:42:04,16.92
2023-08-06 11:43:10,16.98
2023-08-06 11:44:16,17.02
2023-08-06 11:45:22,17.07
2023-08-06 11:46:28,17.11
2023-08-06 11:47:01,17.17
2023-08-06 11:48:07,17.21
2023-08-06 11:49:13,17.26
2023-08-06 11:50:19,17.27
2023-08-06 11:54:10,17.28
2023-08-06 12:03:31,17.29
2023-08-06 12:13:25,17.3
2023-08-06 12:22:13,17.31
2023-08-06 12:32:07,17.32
2023-08-06 12:42:01,17.33
2023-08-06 12:52:28,17.34
2023-08-06 13:02:22,17.35
2023-08-06 13:12:16,17.36
2023-08-06 13:22:10,17.37
2023-08-06 13:31:31,17.38
2023-08-06 13:32:04,17.39
2023-08-06 13:41:25,17.4
2023-08-06 13:51:19,17.41
2023-08-06 14:01:13,17.42
2023-08-06 14:11:07,17.43
2023-08-06 14:21:01,17.44
2023-08-06 14:31:28,17.45
2023-08-06 14:41:22,17.46
2023-08-06 14:51:16,17.47
2023-08-06 14:58:25,17.48
2023-08-06 15:02:16,17.49
2023-08-06 15:06:07,17.5
2023-08-06 15:11:04,17.51
2023-08-06 15:15:28,17.52
2023-08-06 15:20:25,17.53
2023-08-06 15:24:16,17.54
2023-08-06 15:32:31,17.55
2023-08-06 15:42:25,17.56
2023-08-06 15:52:19,17.57
2023-08-06 15:58:22,17.58
2023-08-06 16:02:13,17.59
2023-08-06 16:04:25,17.6
2023-08-06 16:12:07,17.61
2023-08-06 16:21:28,17.62
2023-08-06 16:28:04,17.63
2023-08-06 16:32:28,17.64
2023-08-06 16:36:19,17.65
2023-08-06 16:41:16,17.66
2023-08-06 16:45:07,17.67
2023-08-06 16:50:04,17.68
2023-08-06 16:57:13,17.69
2023-08-06 17:07:07,17.7
2023-08-06 17:17:01,17.71
2023-08-06 17:27:28,17.72
2023-08-06 17:37:22,17.73
2023-08-06 17:47:16,17.74
2023-08-06 17:56:04,17.75
2023-08-06 18:06:31,17.76
2023-08-06 18:16:25,17.77
2023-08-06 18:17:31,17.78
2023-08-06 18:18:04,17.81
2023-08-06 18:19:10,17.85
2023-08-06 18:20:16,17.89
2023-08-06 18:21:22,17.94
2023-08-06 18:22:28,17.98
2023-08-06 18:23:01,18.03
2023-08-06 18:24:07,18.08
2023-08-06 18:25:13,18.12
2023-08-06 18:26:19,18.16
2023-08-06 18:27:25,18.22
2023-08-06 18:28:31,18.25
2023-08-06 18:29:04,18.31
2023-08-06 18:30:10,18.35
2023-08-06 18:31:16,18.38
2023-08-06 18:34:01,18.39
2023-08-06 18:42:16,18.4
2023-08-06 18:52:10,18.41
2023-08-06 19:02:04,18.42
2023-08-06 19:11:25,18.43
2023-08-06 19:21:19,18.44
2023-08-06 19:22:33,unknown
2023-08-06 19:22:39,18.44
2023-08-06 19:31:23,18.45
2023-08-06 19:39:30,unknown
2023-08-06 19:39:36,18.45
2023-08-06 19:41:14,18.46
2023-08-06 19:51:05,18.47

Export Statistic as CSV:

Time stamp,State,Mean,Min,Max
sensor.warmepumpe_energiezahler
2023-08-06 00:00:00,15.17,,,
2023-08-06 01:00:00,15.24,,,
2023-08-06 02:00:00,15.91,,,
2023-08-06 03:00:00,15.97,,,
2023-08-06 04:00:00,16.03,,,
2023-08-06 05:00:00,16.09,,,
2023-08-06 06:00:00,16.18,,,
2023-08-06 07:00:00,16.26,,,
2023-08-06 08:00:00,16.32,,,
2023-08-06 09:00:00,16.42,,,
2023-08-06 10:00:00,16.49,,,
2023-08-06 11:00:00,17.28,,,
2023-08-06 12:00:00,17.34,,,
2023-08-06 13:00:00,17.41,,,
2023-08-06 14:00:00,17.48,,,
2023-08-06 15:00:00,17.58,,,
2023-08-06 16:00:00,17.69,,,
2023-08-06 17:00:00,17.75,,,
2023-08-06 18:00:00,18.41,,,

What am I doing wrong?

Because you put the statisticsPeriod setting in the yaml root, it should be under the csv key.

That usually means that the entity does not have long term statistics stored in the database.

1 Like

Is there anything I can do to activate this?

The Sensor would need to have specific attributes, e.g. measurement, total or total_increasing.

If you set it up manually, it is rather easy to modify that accordingly.

One Way i do use as well, is setting up either a Helper “Combine States” Sensor (e.g. for Temperatures), that would have the first attribute, or an Helper - Energy Meter, that would have ‘total’ attribute.
I am using this more and more, as it makes it easy to replace sensors, while not loosing all the Statistics. You would have to keep in Mind, that it doubles the recorded Values and maybe even the Statistics, if you do not exclude those in the ‘recorder’ Settings, though.

1 Like

Here is my fault: For my heat pump I did set up a template with total_increasing. For my energy meter I did not. Now it works.
Thanks for the hint!

1 Like

BEST THING EVERY !!! :smiley:

it does most thing that I know from trending systems in plant automation systems. The one thing I wish to have would be to have save and load presets, so without have 10 different cards I could just have one and then save presets when I’m finished, and load back when needed again.

One nice feature I have seen in other trending systems is to zoom in and out the time line with right mouse button. With left you move, and with right you zoom in and out when moving the mouse to the right or left.

But this is just a nice-to-have feature and even without it its what I was looking for since using HA :wink:

Thanks a lot for this integration!

You can create a feature request on github !

To zoom interactively, you can use Ctrl-scrollwheel (horizontal zoom) and Shift-scrollwheel (vertical zoom).

1 Like

I integrated the card into standard entity popup more info and looks great! One issue I noticed (and do not related to card rather) is with some energy entities, that displays differently. So for all entities that are coming directly from some integrations (like Shelly PM devices or virtual sensors created with PowerCalc) I see history of energy consumption as bar chart:

image

But for sensors that are template based and are using Riemann Integration to calculate consumtion, I get standard line chart for history:

Standard energy dashboard shows properly all kind of entities in consistent way (I mean I’m not missing daily, weekly monthly or yearly views for any of them). I guess this is something related to Riemann Integration creating these energy entities different;y than other integrations. Is there any way to fix this and have consistent bar chart view for all of these?

Have a look/compare the attributes of these both entities in Dev-Tools. Most probably are difference in state_class and so not total_increasing. If yes, you can add it via customizing to the second entity.

Yes, there are differences. Working sensor for Coffee Machine:

versus not working one for IT Rack:

Difference is in state_class, but I found no way to control it for Rieman Integration.