apatsufas / homebridge-tapo-p100

Homebridge TP-LINK Tapo P100 Platform Plugin
Apache License 2.0
64 stars 14 forks source link

Added 'total' field in getEnergyUsage() #34

Closed vasileio closed 2 years ago

vasileio commented 2 years ago

This relates to Issue #33 (P110 warnings - power consumption related)

After examining the output of getEnergyUsage() of PyP110 I saw that today_energy could be added as the (missing) total of getEnergyUsage() response in p110.ts.

This should solve the

This plugin generated a warning from the characteristic 'Total Consumption': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info.

warning message in the Homebridge log that I reported.

I really tried to test this before creating the PR but it wasn't possible to install a fork in (I've got zero experience in Homebridge development).

Looking forward to any feedback! Thanks for your time.

apatsufas commented 2 years ago

Thanks @vasileio