mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-12 10:28:01 +00:00
Get child emeters with CLI (#623)
* Get child emeters with CLI * Avoid extra IO when not que querying the child emeter
This commit is contained in:
@@ -128,7 +128,7 @@ def get_device_class_from_sys_info(info: Dict[str, Any]) -> Type[SmartDevice]:
|
||||
|
||||
def get_device_class_from_family(device_type: str) -> Optional[Type[SmartDevice]]:
|
||||
"""Return the device class from the type name."""
|
||||
supported_device_types: dict[str, Type[SmartDevice]] = {
|
||||
supported_device_types: Dict[str, Type[SmartDevice]] = {
|
||||
"SMART.TAPOPLUG": TapoPlug,
|
||||
"SMART.TAPOBULB": TapoBulb,
|
||||
"SMART.KASAPLUG": TapoPlug,
|
||||
@@ -147,7 +147,7 @@ def get_protocol(
|
||||
protocol_transport_key = (
|
||||
protocol_name + "." + config.connection_type.encryption_type.value
|
||||
)
|
||||
supported_device_protocols: dict[
|
||||
supported_device_protocols: Dict[
|
||||
str, Tuple[Type[TPLinkProtocol], Type[BaseTransport]]
|
||||
] = {
|
||||
"IOT.XOR": (TPLinkSmartHomeProtocol, _XorTransport),
|
||||
|
Reference in New Issue
Block a user