home-assistant-tapo-p100 icon indicating copy to clipboard operation
home-assistant-tapo-p100 copied to clipboard

Add month_energy, today_runtime and month_runtime as entities etc.

Open szerencl opened this issue 3 years ago • 4 comments

Based on P110 Energy Monitoring support #64 there are lots of useful entities that could be added to home assistant.

E.g.:

  • month_energy
  • today_runtime
  • month_runtime
  • overheated
  • signal_level
Data run today from your updated script

743e03c849dfa98b94c9394174d8f2544cc6b4d1
{'device_id': '80222EF474BEC01D849DB7F9B01DB7041E800077', 'fw_ver': '1.0.7 Build 210629 Rel.174901', 'hw_ver': '1.0', 'type': 'SMART.TAPOPLUG', 'model': 'P110', 'mac': 'C0-06-C3-E4-AB-5C', 'hw_id': '56DD079101D61D400A11C4A3D41C51DA', 'fw_id': '00000000000000000000000000000000', 'oem_id': 'AE7B616A7168B34151ABBCF86C88DF34', 'overheated': False, 'ip': '192.168.0.59', 'time_diff': 0, 'ssid': 'U0tZNVlSR0s=', 'rssi': -44, 'signal_level': 3, 'latitude': 513553, 'longitude': -18955, 'lang': 'en_US', 'avatar': 'plug', 'region': 'Europe/London', 'specs': '', 'nickname': 'UG93ZXIgRGVzaw==', 'has_set_location_info': True, 'device_on': True, 'on_time': 31570, 'default_states': {'type': 'last_states', 'state': {}}}
{'today_runtime': 1018, 'month_runtime': 31986, 'today_energy': 610, 'month_energy': 24609, 'local_time': '2021-09-03 17:17:26', 'past24h': [22, 18, 19, 18, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 7, 51, 59, 69, 62, 53, 53, 82, 82, 18], 'past30d': [0, 0, 0, 311, 914, 1127, 1690, 1559, 1631, 1683, 1478, 1484, 1347, 837, 833, 979, 681, 644, 1174, 1612, 1034, 843, 857, 348, 0, 0, 0, 266, 667, 610], 'past1y': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23066, 1543], 'past7d': [[26, 26, 25, 26, 25, 25, 26, 26, 28, 27, 29, 27, 23, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 22, 8, 57, 50, 27, 23, 9, 29, 7, 7, 6, 8], [7, 7, 7, 8, 7, 7, 7, 8, 22, 51, 62, 44, 60, 67, 64, 61, 60, 23, 22, 18, 19, 18, 9, 9], [9, 9, 9, 9, 9, 9, 10, 10, 7, 51, 59, 69, 62, 53, 53, 82, 82, 18, 0, 0, 0, 0, 0, 0]], 'current_power': 40274}
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x10ffbdfd0>
guyshoebridge@Mac-mini ~ %

Originally posted by @gshoebridge in https://github.com/petretiandrea/home-assistant-tapo-p100/issues/64#issuecomment-912657947

szerencl avatar Dec 28 '21 09:12 szerencl

Added overheat and RSSI with pull request #108

petretiandrea avatar Jan 07 '22 09:01 petretiandrea

Added month energy by #154. Thanks to @gpancot

petretiandrea avatar Mar 13 '22 20:03 petretiandrea

How do you get the month energy exposed, or is it only for specific device models?

loryanstrant avatar Jul 24 '22 09:07 loryanstrant

Just pinging on this given how long ago it was added. @gpancot are you able to clarify if the L920 supports energy being exposed? Thanks!

loryanstrant avatar Aug 10 '22 11:08 loryanstrant

Quick question that might be related. The L530 also report powerusage. Is it possible to read those values?

RentonArisugawa avatar Dec 11 '22 15:12 RentonArisugawa

Thanks to @josecoelho96 is working on it #303

petretiandrea avatar Dec 30 '22 12:12 petretiandrea