Daily sensors

Summary
I am looking for some advice on how to represent sensor data whose value is updated.

Context
I have a list of sensors whose data is only updated once a day (e.g. weight, # of hours slept, etc). When using the standard sensor, this is the most common representation:

Nothing happens for 23h59min, and then, a sudden jump.

Goal
My objective is to be able to track the evolution across multiple days: for example, a 7d or 30d day graph with one data point per day.

The extramile would be being able to extract the daily data like this:

Ideas / Troubleshooting
I have history, logbook and recorder enabled. However, I am unsure about how to leverage this data.

I have been reading about statistics entity. This can be useful to do calculations (e.g. average time slept in last 30d). However, graphs still seems to be per minute/hour instead of per day.

Questions

  • How do you manage this type of sensors? Specially when you want several stats like yesterday, last 7d, last 30d…
  • How do you visualize the graphs in a daily or aggregated fashion in a way that makes sense?

Thank you!

influxDB and Grafana would be the best way to explore this sort of long term data.

Alternatively the mini-graph lovelace component allows all sorts of variations in graph data, including the number of days to display, how often to sample (it is per hour, so the default of 0.5 gives a data point every 2 hours. Presumably once a day would be 0.0416666666! (1/24).

1 Like

I use the mini graph for this kind of task

I’m number 3 who says mini graph card :wink:
set the dots per hour to your liking

@tom_l
Thanks a lot. Grafana looks brilliant and perfect for the use case. I think I am going to give it a try at the easy solution with minicards, but moving to a full flesh solution like this could be valuable. Have you seen any good use cases for it? I would love to read some configs out there to see what other people have done with it. Thanks!

@nickrout @DavidFW1960 @Underknowledge
Thanks a lot for the replies. I think the mini-graph could do the trick here for the display.
How did you configure it for this kind of behaviour?

The graph seems to be hourly: see the attribute “hours_to_show”. Do you extend this?
I understand that “points_per_hour: 0.04 # 1/24h” would just reduce the data points, but unsure how to display daily instead of hourly data.

@nitobuendia check out this live stream by frenk:

Hi, e.g. hours_to_show: 168 (7*24h) will show one week in the card