I want to display min and max value in 24h for outside sensor.
Is in this sensor min_age and max_age attribute depends on sampling_size ?
How to calculate sampling_size for last 24 hours ? This is zigbee sensor with variable sampling time.
- platform: statistics
entity_id: sensor.outside
name: "Outside stats"
sampling_size: 500
max_age:
minutes: 1440
- platform: template
sensors:
outside_max:
friendly_name: "outside max"
value_template: "{{ state_attr('sensor.outside_stats', 'max_value') }}"
unit_of_measurement: "°C"
outside_min:
friendly_name: "outside min"
value_template: "{{ state_attr('sensor.outside_stats', 'min_value') }}"
unit_of_measurement: "°C"