Hi !
Maybe using the - platform: statistics ? statistics
And then making a calculation between max and min ?
But don’t know how to deal for the max and min identification with several variations
You can use the Trend integration to create a binary sensor that returns ‘on’ when the temperature is changing above your specified degrees/time. Then monitor that sensor with a History stats sensor. The History Stats integration will give you the number of hours/day the temperature is rising.
Make sure to read the documentation carefully, especially with regards to the Trend sensor. You will need to set the sample variables based on your specific case and the devices you are using.