You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Bug description
Device.connect()for IOT + KLAP devices can instantiate the wrong device class because_connect()currently derives class fromdevice_familyinstead of livesystem.get_sysinfo.For
IOT.SMARTPLUGSWITCH, family mapping always yieldsIotPlug, 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 doessystem.get_sysinfo-based class detection forIotProtocol + XorTransport.IOT KLAP paths (including KLAP v2 devices) go through family mapping:
IOT.SMARTPLUGSWITCH -> IotPlugThis loses strip-vs-plug distinction for KLAP-connected strips.
Expected behavior
For IOT plug/switch and bulb families,
_connect()should derive device class fromsystem.get_sysinfo(same behavior pattern currently used for XOR), regardless of whether transport is XOR or KLAP/KLAPv2.Impact
Related