Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion kasa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ def __getattr__(name):
from . import smart

smart.SmartDevice("127.0.0.1")
smart.SmartBulb("127.0.0.1")
iot.IotDevice("127.0.0.1")
iot.IotPlug("127.0.0.1")
iot.IotBulb("127.0.0.1")
Expand Down
4 changes: 1 addition & 3 deletions kasa/bulb.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
from abc import ABC, abstractmethod
from typing import NamedTuple, Optional

from .device import Device

try:
from pydantic.v1 import BaseModel
except ImportError:
Expand Down Expand Up @@ -45,7 +43,7 @@ class BulbPreset(BaseModel):
mode: Optional[int] # noqa: UP007


class Bulb(Device, ABC):
class Bulb(ABC):
"""Base class for TP-Link Bulb."""

def _raise_for_invalid_brightness(self, value):
Expand Down
4 changes: 2 additions & 2 deletions kasa/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
IotWallSwitch,
)
from kasa.iot.modules import Usage
from kasa.smart import SmartBulb, SmartDevice
from kasa.smart import SmartDevice

try:
from pydantic.v1 import ValidationError
Expand Down Expand Up @@ -88,7 +88,7 @@ def wrapper(message=None, *args, **kwargs):
"iot.strip": IotStrip,
"iot.lightstrip": IotLightStrip,
"smart.plug": SmartDevice,
"smart.bulb": SmartBulb,
"smart.bulb": SmartDevice,
}

ENCRYPT_TYPES = [encrypt_type.value for encrypt_type in EncryptType]
Expand Down
8 changes: 4 additions & 4 deletions kasa/device_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
BaseProtocol,
BaseTransport,
)
from .smart import SmartBulb, SmartDevice
from .smart import SmartDevice
from .smartprotocol import SmartProtocol
from .xortransport import XorTransport

Expand Down Expand Up @@ -162,12 +162,12 @@ def get_device_class_from_family(device_type: str) -> type[Device] | None:
"""Return the device class from the type name."""
supported_device_types: dict[str, type[Device]] = {
"SMART.TAPOPLUG": SmartDevice,
"SMART.TAPOBULB": SmartBulb,
"SMART.TAPOSWITCH": SmartBulb,
"SMART.TAPOBULB": SmartDevice,
"SMART.TAPOSWITCH": SmartDevice,
"SMART.KASAPLUG": SmartDevice,
"SMART.TAPOHUB": SmartDevice,
"SMART.KASAHUB": SmartDevice,
"SMART.KASASWITCH": SmartBulb,
"SMART.KASASWITCH": SmartDevice,
"IOT.SMARTPLUGSWITCH": IotPlug,
"IOT.SMARTBULB": IotBulb,
}
Expand Down
3 changes: 1 addition & 2 deletions kasa/smart/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Package for supporting tapo-branded and newer kasa devices."""

from .smartbulb import SmartBulb
from .smartchilddevice import SmartChildDevice
from .smartdevice import SmartDevice

__all__ = ["SmartDevice", "SmartBulb", "SmartChildDevice"]
__all__ = ["SmartDevice", "SmartChildDevice"]
189 changes: 0 additions & 189 deletions kasa/smart/smartbulb.py

This file was deleted.

Loading