Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

IOT KLAP devices can be misclassified as IotPlug (missing children) #1691

Copy link
Copy link
@thatdaveguy1

Description

@thatdaveguy1
Issue body actions

Bug description

Device.connect() for IOT + KLAP devices can instantiate the wrong device class because _connect() currently derives class from device_family instead of live system.get_sysinfo.

For IOT.SMARTPLUGSWITCH, family mapping always yields IotPlug, so strips like HS300/KP303 can be created without children (device.children == []) even though sysinfo contains child outlets.

Why this happens

In kasa/device_factory.py, _connect() only does system.get_sysinfo-based class detection for IotProtocol + XorTransport.

IOT KLAP paths (including KLAP v2 devices) go through family mapping:

  • IOT.SMARTPLUGSWITCH -> IotPlug

This loses strip-vs-plug distinction for KLAP-connected strips.

Expected behavior

For IOT plug/switch and bulb families, _connect() should derive device class from system.get_sysinfo (same behavior pattern currently used for XOR), regardless of whether transport is XOR or KLAP/KLAPv2.

Impact

  • HS300/KP303 and similar strips can authenticate but be exposed as plain plugs.
  • Child outlet controls become unavailable.

Related

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.