You should be able to add the sensors to your configuration.yaml. I would need to double check but I believe all of the sensors in all of my yaml’s start with the sport.
So all sports sensors start with their name NBA = sensor.nba_, NFL = sensor.nfl_, Golf = sensor.golf_*, etc.
Here is my configuration.yaml recorder section but honestly I don’t pay attention to the what I am guessing you are going after is db size.
recorder:
exclude:
domains:
- teamtracker
entity_globs:
- sensor.mlb_*
- sensor.nfl_*
- sensor.nhl_*
- sensor.nba_*
- sensor.wnba_*
- sensor.ncaaf_*
- sensor.f1_*
- sensor.nascar_*
- sensor.tennis_*
- sensor.golf_*
- sensor.ufl_*
You probably could write an automation to purge more frequently but would need to test. Something like this:
alias: Purge Sports Sensor Data
description: ""
triggers:
- at: "02:00:00"
trigger: time
actions:
- data:
keep_days: 5
target:
entity_id:
- sensor.mlb_*
- sensor.nfl_*
- sensor.nhl_*
- sensor.nba_*
- sensor.wnba_*
- sensor.ncaaf_*
- sensor.f1_*
- sensor.nascar_*
- sensor.tennis_*
- sensor.golf_*
- sensor.ufl_*
action: recorder.purge_entities
mode: single
Might check this link as well
https://community.home-assistant.io/t/how-to-keep-your-recorder-database-size-under-control/295795
If it is a performance thing when you are looking at states in developer tools and it is taking a long time - make sure to uncheck the attributes box (@ehcah showed me that) and it really helps when youre looking at sensors.