Detailled history state output for power monitor on file


i have a power monitor, and have it with the following card:

type: custom:mini-graph-card
name: W5821 Power Usage
icon: mdi:washing-machine
  - sensor.power_2
  graph: line
hours_to_show: 3
points_per_hour: 60

and it works very well.

I want to have the history state output of it in a cvs or any other format which enables me to have it on a spreadsheet, with date, time and measured data.

ANy hint in how to have it?

hi friends, any hint?