mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-15 11:58:02 +00:00
Add support for tapo bulbs (#558)
* Add support for tapo light bulbs * Use TapoDevice for on/off * Add tapobulbs to discovery * Add partial support for effects Activating the effect does not work as I thought it would, but this implements rest of the interface from SmartLightStrip. * Add missing __init__ for tapo package * Make mypy happy * Add docstrings to make ruff happy * Implement state_information and has_emeter * Import tapoplug from kasa.tapo package * Add tapo L530 fixture * Enable tests for L530 fixture * Make ruff happy * Update fixture filename * Raise exceptions on invalid parameters * Return results in a wrapped dict * Implement set_* * Reorganize bulbs to iot&smart, fix tests for smarts * Fix linting * Fix BULBS_LIGHT_STRIP back to LIGHT_STRIPS
This commit is contained in:
@@ -15,7 +15,7 @@ from kasa import (
|
||||
from kasa.discover import DiscoveryResult, _DiscoverProtocol, json_dumps
|
||||
from kasa.exceptions import AuthenticationException, UnsupportedDeviceException
|
||||
|
||||
from .conftest import bulb, dimmer, lightstrip, plug, strip
|
||||
from .conftest import bulb, bulb_iot, dimmer, lightstrip, plug, strip
|
||||
|
||||
UNSUPPORTED = {
|
||||
"result": {
|
||||
@@ -46,7 +46,7 @@ async def test_type_detection_plug(dev: SmartDevice):
|
||||
assert d.device_type == DeviceType.Plug
|
||||
|
||||
|
||||
@bulb
|
||||
@bulb_iot
|
||||
async def test_type_detection_bulb(dev: SmartDevice):
|
||||
d = Discover._get_device_class(dev._last_update)("localhost")
|
||||
# TODO: light_strip is a special case for now to force bulb tests on it
|
||||
|
Reference in New Issue
Block a user