Pull up emeter handling to tapodevice base class (#601)

* Pull has_emeter property up to tapodevice base class

This will also use the existence of energy_monitoring in the component_nego query to decide if the device has the service.

* Move emeter related functions to tapodevice

* Remove supported_modules override for now

This should be done in a separate PR, if we want to expose the available components to cli and downstreams

* Dedent extra reqs

* Move extra_reqs initialization

* Fix tests
This commit is contained in:
Teemu R
2024-01-03 19:04:34 +01:00
committed by GitHub
parent 864ea92ece
commit 10fc2c3c54
4 changed files with 76 additions and 79 deletions

View File

@@ -17,17 +17,6 @@ class TapoBulb(TapoDevice, SmartBulb):
Documentation TBD. See :class:`~kasa.smartbulb.SmartBulb` for now.
"""
@property
def has_emeter(self) -> bool:
"""Bulbs have only historical emeter.
{'usage':
'power_usage': {'today': 6, 'past7': 106, 'past30': 106},
'saved_power': {'today': 35, 'past7': 529, 'past30': 529},
}
"""
return False
@property
def is_color(self) -> bool:
"""Whether the bulb supports color changes."""