Yes it does record attributes.
You have three options available to you:
- Create a template sensor that is based on the attribute value and use the core history graph
or
- Use the custom card Apexcharts.
or
- Use the custom mini-graph card.
Bot of the last two options support graphing attributes directly. Though they won’t be much use for text based sensors, like your requirement.
If there are only two modes you could create a binary sensor that they can graph.