Min and max pressure

Hello, i want to make this barometer
tempometer-gauge-card

but, the min max pressure does not work - uknow
here is my code:

- platform: template
  sensors:
      pressure_min:
        friendly_name: Min tlak
        value_template: "{{ state_attr('sensor.stats_pressure', 'min_value') }}"
        unit_of_measurement: 'hPa'

      pressure_max:
        friendly_name: Max tlak
        value_template: "{{ state_attr('sensor.stats_pressure', 'max_value') }}"
         unit_of_measurement: 'hPa'
    
- platform: statistics

  entity_id: sensor.pressure
  name: stats_pressure
  sampling_size: 2000
  max_age:
       hours: 24

wht is wrong, how i do it,
thanks

You didn’t read official documentation :slight_smile: Statistics - Home Assistant

- platform: statistics
  entity_id: sensor.pressure
  state_characteristic: value_min
  name: pressure_min_24h
  sampling_size: 2000
  max_age:
       hours: 24

- platform: statistics
  entity_id: sensor.pressure
  state_characteristic: value_max
  name: pressure_max_24h
  sampling_size: 2000
  max_age:
       hours: 24
  
1 Like

Thank you very much
I read but did not understand
I start with HA, I don’t understand everything, and I make a lot of mistakes on the way according to the finished examples
thank you again, it works

No worries, we all started there. I found HA easy to get a hang of.

Glad it’s working! Best!