#Stats for month
1 messages · Page 1 of 1 (latest)
- platform: statistics
name: "Outdoor Maximum Temperature over last 24 hours"
entity_id: sensor.esps2_living_room_temperature
state_characteristic: value_max
max_age:
hours: 24
- platform: statistics
name: "Outdoor Minimum Temperature over last 24 hours"
entity_id: sensor.esps2_living_room_temperature
state_characteristic: value_min
max_age:
hours: 24
- platform: statistics
name: "Outdoor Minimum Temperature over 1 month"
entity_id: sensor.esps2_living_room_temperature
state_characteristic: value_min
max_age:
month: 1
- platform: statistics
name: "Outdoor Maximum Temperature over 1 month"
entity_id: sensor.esps2_living_room_temperature
state_characteristic: value_max
max_age:
month: 1
```
24 hour sensors are working fin 1month are showing up
Invalid config for 'statistics' from integration 'sensor' at configuration.yaml, line 161: 'month' is an invalid option for 'sensor.statistics', check: max_age->month```
now how to use month?
Stats for month
Try converting month to hours. I was just checking if month is supported and I don't think it is.
https://www.home-assistant.io/integrations/statistics/ it doesn't mention months or any particular time unit
30days are 720 hours
So, try hours: 720.
yes it worked
Ok, now, here's one wrinkle. The statistics integration doesn't use long term statistics, so you'll want to make sure your recorder integration is setup to track data for that long.
now how to do that?
In your recorder settings.
https://i.ibb.co/f8H2LTW/image.png this is how it looks right now
Yup. But depending on how long you are storing recorder entries, that number may or may not be accurate. Recorder only keeps 10 days of data by default. So, at most, you are getting 24 hours and 240 hours, not 720.
now need to adjust the recorder for 30days
Yup
Excatly.
But, just know that will increase your database size (if you're concerned about disk space or whatnot).
256Gb SSD should be enough for 30 days
https://i.ibb.co/g3FCw35/image.png minimum for 30 days is higher than the minimum for the last 24 hours 😅
That could just be a standard variation in the source data though.