mihai-dinculescu / tapo

Unofficial Tapo API Client. Works with TP-Link Tapo smart devices. Tested with light bulbs (L510, L520, L530, L535, L610, L630), light strips (L900, L920, L930), plugs (P100, P105, P110, P115), power strips (P300, P304), hubs (H100), switches (S200B) and sensors (KE100, T100, T110, T300, T310, T315).
MIT License
400 stars 41 forks source link

EnergyUsageResult.today_energy wrong units in comments? #262

Closed felixwatts closed 2 weeks ago

felixwatts commented 1 month ago

The comments say this field (and several similar ones) are in watts, but watts isn't a unit of energy. Should it be kilowatt hours or maybe Joules?

mihai-dinculescu commented 1 month ago

It's Watts per hour. That's what the Tapo API returns. You can divide the value by 1000 to get Killowats per hour.

It would be good to have the documentation updated.

mjp4 commented 1 month ago

It will be "Watt Hours" (i.e. Power * time), not Watts per Hour (which would be Power / Time, which doesn't make sense).

mihai-dinculescu commented 3 weeks ago

@felixwatts, @mjp4, could you please review the referenced PR to verify that the correct units are now specified?