FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

IOT KLAP devices can be misclassified as IotPlug (missing children) · Issue #1691 · python-kasa/python-kasa · GitHub

Repository navigation

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

Closed as not planned

Description

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

Activity

  1. thatdaveguy1 commented on Apr 18, 2026

    Author

    Implemented in #1692.

  2. github-actions commented on Jul 18, 2026

    There hasn't been any activity on this issue recently. This issue has been automatically marked as stale because of that. It will be closed if no further activity occurs.
    Please make sure to update to the latest python-kasa version and check if that solves the issue.
    Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL