Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Cleanup
  • Loading branch information
rytilahti committed Jul 10, 2026
commit 4e71ac081c2ae7bb38aceb58c6d7b07205abf10a
7 changes: 3 additions & 4 deletions kasa/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,13 @@ def from_int(value: int) -> SmartErrorCode:
]


#: Onboarding sources we can authenticate with. Devices provisioned via other
#: sources have valid encryption but use credentials we cannot access.
#: Onboarding sources that are known to work
SUPPORTED_OBD_SRCS = {"tplink", "matter", "apple"}


class UnsupportedAuthenticationError(UnsupportedDeviceError, AuthenticationError):
"""Raised when authentication fails with unsupported provisioning method.

This can be used to display a more helpful message to the user when their devices
have been provisioned using the tplink simple setup (tss).
This can be used to display a more helpful message in when we know it is
not necessarily an issue with the inputted credentials.
"""
3 changes: 0 additions & 3 deletions tests/test_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,11 +441,8 @@ async def test_unsupported_authentication_exception_for_tss(mocker):
),
)

# Connection parameters succeed — no short-circuit on obd_src
assert Discover._get_connection_parameters(dr) is not None

# When on_discovered propagates UnsupportedAuthenticationError (raised by update()),
# the wrapper routes it to on_unsupported
unsupported_calls = []

async def on_discovered(dev):
Expand Down
Loading