Graph question

I´m very new to HA, and this is my first post on the forum, so I´m sorry if this is a stupid question. And I apologize in advance for my english

I’m starting to configure some graphs, but I can’t understand what I’m doing wrong, I have a tuya WiFi Din Rail Switch with metering, and wanted to get a graph of the power usage over time. I created this very simple graph:

chart_type: line
period: hour
type: statistics-graph
entities:

  • sensor.220_potencia
    stat_types:
  • mean
  • min
  • max
    days_to_show: 30


so I asked chatgpt how to change the sample period of the graph, it told me to use scan_interval, so I asked to change the code of the card, but it said I had to change the sensor configuration, so I asked where was it, and said that I have a tuya WiFi Din Rail Switch with metering, then it said that tuya integration collect the data automatically, and I couldn’t change it’s sample period, but then when I opened the device I saw this graph

which is already a very good graph, but I cant show it on my dashboard, and I don’t know what I’m doing wrong and even how to ask for chat gpt for help.

sorry for the long post

use historic graph

when you use a sensor like power meter will showe you the graph

like this one

if you add multiple sensor you will get something like this one

I liked your graphs, can you please share the yaml?
But I still miss one thing that is the min, max nd average vallue that shows when acess the sensor thru config → enitities

you dont need a yaml as this is a already normal card

theres noting fancy

If you like the chart in the more-info, that’s probably statistics with a 5minute period.

That is the finest resolution that statistics collects, and it is not stored as long as hourly statistics, so you will be limited to the length of data-retention in your recorder (default 10 days) for a 5minute graph.

Hourly stats are retained forever though.

But you can get that graph by changing your period to 5minute.

the first one has something fancy, with red yellow and green indicator of voltage

I was referring to this:

The red/yellow/green card is a Gauge card

change to 5 minute period is exactly what I was trying to do

When you say "hourly stats are retained forever it worries me, where? in my ssd? So I need to limit it because at somepoint it will fill my ssd, or not?

noting fancy normal card

When you say "hourly stats are retained forever it worries me, where? in my ssd? So I need to limit it because at somepoint it will fill my ssd, or not?

Maybe in 10,000 years it will fill up, but the data used is pretty insignificant. You can purge them from developer-tools/statistics if you ever need to reclaim the storage.

Welcome :slight_smile:

of curse it will add data to your disk but you will need more than 10 years for all your sensors to fill a 1gb disk

yes, i´d like this graph on my dashboard, if I use chart_type:line it stayes horrible like this


it gets a litle better

but it still with 1h sample and it isn’t quite good like the one in config wich has a 5 minute sample

you can change the size on the design tab

on HACS you can have other types of graphs like mini-graph-card, apexcharts-card ,apexcharts-card

thank you so much for all your help, i’m trully learning a lot from your coments, like the gauge graph, hacs graphs…