Track energy consumption when device is online

Hi everyone, I wanted to ask if someone already has experience by tracking device consumption based on their status (home/not_home). I have a device tracker “device_tracker.pc300” and I know the consumption in W. What is the best way now to handle this to display it in the engery dashboard.
Is it possible without a custom-component?

Thank you in advance, Anna

It’s possible but it’s much easier to use this one:

Hi Tom, I already knew you would recommend this post :slight_smile: But how would you program it manually? I would like to see the way to do it so I can learn to program and understand the language.

No idea, I don’t use it. Read the documentation. If you cant work it out then ask for help in the linked topic.