Energy consumption graph from SmartPlug

Hello there,

I am quite new to this world and have started to display my energy consumption, which I get via the SmartPlugs from Tuya, in a graph. But Unfortunately, I don’t see anything.
My template:

type: custom:apexcharts-card
chart_type: donut
graph_span: 1h
  show: false
  title: Energieverbrauchszusammensetzung
  show_states: false
  colorize_states: true
  - entity: switch.tuya_switch
    data_generator: return entity.attributes.current_consumption;
    name: Room
      show: false

and these are my attributes which I got from localTuya

current: 765
current_consumption: 137.9
voltage: 241.7
raw_state: true
friendly_name: tuya_switch

Maybe the access to the attribute is wrong?

Thanks for your help!

Are you trying to use the Energy Dashboard?
I use Shelly Plug S for a lot of power monitoring. The entity I use on the Energy Dashboard is reporting in kWh. This works great on the Energy Dashboard - but you might have to wait for an hour or so before you see the first data appear in this dashboard.

For basic reporting “here and now monitoring” on my own dashboards I use the entity from the Shelly-device called xyz_current_consumption.
If you just create a basic Entity Card with your current_consumption you should see the current power usage in Watts.