Min/Max shows current

Hi,
I’d like to display min/max values of an outside temperature sensor.

sensor:
 - platform: min_max
   name: minimum_temperature_exterieure
   type: min
   entity_ids:
     - sensor.temperature_exterieure
 - platform: min_max
   name: maximum_temperature_exterieure
   type: max
   entity_ids:
     - sensor.temperature_exterieure

But I always get the current temperature, not the min or max :
png1

entity_ids
(list | string)(Required)

At least two entities to monitor. The unit of measurement of the first entry will be the one that’s used. All entities must use the same unit of measurement.

At least two entities

Oh, so this sensor isn’t what I searched for.
I’m looking to get the min/max values of a sensor, for 24h for example.

Hello,

the min-max sensor compares several sensors,
you need the statistics sensor.

Thanks, I got the expected values with :

sensor:
 - platform: statistics
   entity_id: sensor.temperature_exterieure
   max_age:
       minutes: 1440 
   name: stats_temperature_exterieure
 - platform: template
   sensors:
     exterieur_temp_min:
       value_template: "{{ state_attr('sensor.stats_temperature_exterieure', 'min_value') }}" 
     exterieur_temp_max:
        value_template: "{{ state_attr('sensor.stats_temperature_exterieure', 'max_value') }}" 
1 Like

hello people, can someone help me to register the minimum temperature at night.
I want to be able to see in the morning how cold the night has been

Unfortunately, this type no longer works since the last update on 2021.12.2. is there a simple solution?

Yes, just use following :

sensor:
 - platform: statistics
   name: "Temp Ext min for 12 Hours"
   entity_id: sensor.temperature_exterieure_rounded
   state_characteristic: value_min
   max_age:
     hours: 12
 - platform: statistics
   name: "Temp Ext max for 12 Hours"
   entity_id: sensor.temperature_exterieure_rounded
   state_characteristic: value_max
   max_age:
     hours: 12  

:sunglasses: thanks, i will test that this we

max value is currently the current value :frowning: