Recorder, attributes, customization and DB size

Problem statement: HA DB size is big because recorder saves into it all the attributes of the entities. Even the ones related to customization that do never rarely change.

Examples:

an entity from ESPHome

an entity from a Zigbee integration

I’d like to understand how to configure the system in order to completely get rid of recording the attributes that do not change, or I can put it another way, that I’m not interested in. My interest is only state column so that graphs can be build by Home Assistant default cards.

Does anybody know how to do that?