Calculating Energy Consumption with Smart Plugs

Hey everyone, I just installed a smart plug for my pool pump and I’m really excited about the possibilities it offers. However, I’m trying to figure out how to track the energy consumption in kWh. Right now, the plug only shows the current power usage in watts, like 50W or 100W. What I’d love is to see the actual energy usage over time—daily, weekly, or monthly. This way, I could monitor how much electricity my pool pump is really using. I’ve tried a few things, but nothing seems to work so far. Does anyone know if this is possible in Home Assistant with just the wattage data? Or do I need to set up something extra to log and calculate the energy usage properly? I’d really appreciate any advice or step-by-step guidance on how to achieve this. Thanks in advance!