Please Help - How to keep only the state of switch in HAdb excluding the attributes?

Please help!

It came across when reading one excellent post concerning HAdb that my smart plugs (many of them) are using the most of the space in my HAdb. The reason is obvious; the plugs have energy monitoring. I need to store only the state (on/off) to the database. If I include the switch.xyz in recorder it uses a lot space. So what is the solution:

  1. Copy all the switch states to input boolean (what is the easiest way to do that for many switches) and store that to database and exclude the switch

  2. Create a binary_sensor of the state of the switch in configuration.yaml (and again example how) and store binary sensor to database and exclude the switch

  3. Something else?

Voltage must use a lot space:
image
There are couple more attributes which also use the space:
image

EDIT: solution was found in another thread - case closed - I do not delete this - maybe this will help someone else having the same problem

binary_sensor:
  - platform: template
    sensors:
      m_heat1:
        device_class: plug
        value_template: "{{ is_state('switch.m_heat1', 'on') }}"