mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-12-22 12:40:17 +00:00
Switch from TPLinkSmartHomeProtocol to IotProtocol/XorTransport (#710)
* Switch from TPLinkSmartHomeProtocol to IotProtocol/XorTransport * Add test * Update docs * Fix ruff deleting deprecated import
This commit is contained in:
@@ -19,8 +19,10 @@ from voluptuous import (
|
||||
from ..credentials import Credentials
|
||||
from ..deviceconfig import DeviceConfig
|
||||
from ..exceptions import SmartDeviceException
|
||||
from ..protocol import BaseTransport, TPLinkSmartHomeProtocol, _XorTransport
|
||||
from ..iotprotocol import IotProtocol
|
||||
from ..protocol import BaseTransport
|
||||
from ..smartprotocol import SmartProtocol
|
||||
from ..xortransport import XorTransport
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@@ -381,10 +383,10 @@ class FakeSmartTransport(BaseTransport):
|
||||
pass
|
||||
|
||||
|
||||
class FakeTransportProtocol(TPLinkSmartHomeProtocol):
|
||||
class FakeTransportProtocol(IotProtocol):
|
||||
def __init__(self, info):
|
||||
super().__init__(
|
||||
transport=_XorTransport(
|
||||
transport=XorTransport(
|
||||
config=DeviceConfig("127.0.0.123"),
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user