Statistics Sensor. Max for day, not 24 hours?

I am trying to use the Statistics sensor to give the Min and Max values of another sensor for the current day (from midnight). However I can only manage to get it to give me the values for the last 24 hours.

Is there a way of being able to do what I require.

Thanks

Here is a similar question.
It’s not a happy reading but you are not alone about the issue

Perhaps the utility sensor is a second best that is acceptable?
It can at least be reset both automatically and manually (I assume).

Thanks for the quick response. I am not sure either will work. The source sensor is a temperature sensor and all I want to do is display the Min/Max temperature for the day.

Oh well I will keep looking for a solution.

In that case you probably need to make something on your own.
If you have a input number that you set to some very high number each night and then only change the state when the sensor you record is lower than what your input number is then you will get the min value.
And then do the opposite for max value.

It shouldn’t be to hard to make those automations. I believe you need three automations, one for each input number (min/max) and one to “reset” them both at night.

I think you are right.

The values get updated every 5 minutes so I will write an automation that gets triggered by the update and then updates both the Max and Min values if necessary and then save them to MQTT sensors.

I will have another automation that runs at midnight which resets these values to the current temperature.

Thanks for your help.

1 Like