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

H100 - Raised error: not enough values to unpack (expected 2, got 1) · Issue #1499 · python-kasa/python-kasa · GitHub

Repository navigation

H100 - Raised error: not enough values to unpack (expected 2, got 1) #1499

Closed

Description

Hello,

I discovered in Home Assistant that my T310 (connected via H100) was reported as unavailable and upon investigating I found that python-kasa was throwing the attached error.

I ran the following command from inside the Home Assistant v2025.2.1 docker container kasa --username <username> --password <password> --host <host> --debug &> dump.txt.

python-kasa-v0.10.1-dump.txt

Activity

  1. rytilahti commented on Feb 9, 2025

    Member

    Looks like the device is not reporting its build version as part of the firmware version field:

    'fw_ver': '1.5.0',  
    

    which causes the crash as the code is expecting the version string to contain an empty space.

    Relevant information from the log:

      File "/usr/local/lib/python3.13/site-packages/kasa/cli/device.py", line 70, in state
        title_prefix=f"{child.alias} ({child.model})",
                                       ^^^^^^^^^^^
      File "/usr/local/lib/python3.13/site-packages/kasa/smart/smartdevice.py", line 590, in model
        return self.device_info.short_name
               ^^^^^^^^^^^^^^^^
      File "/usr/local/lib/python3.13/site-packages/kasa/smart/smartchilddevice.py", line 63, in device_info
        return self._get_device_info(
               ~~~~~~~~~~~~~~~~~~~~~^
            {
            ^
        ...<3 lines>...
            None,
            ^^^^^
        )
        ^
      File "/usr/local/lib/python3.13/site-packages/kasa/smart/smartdevice.py", line 916, in _get_device_info
        firmware_version, firmware_build = fw_version_full.split(" ", maxsplit=1)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    

    It would be great if you could create a fixture file (https://python-kasa.readthedocs.io/en/stable/contribute.html#contributing-fixture-files) to this device and upload it, so we can add a test & create a fix for this. This can be done on any device that runs python, so no need to do it inside a docker container.

  2. LXGaming commented on Feb 9, 2025

    ContributorAuthor

    Unfortunately attempting to create a fixture results in the same error occurring

    python-kasa-fixture-dump.txt

  3. rytilahti commented on Feb 9, 2025

    Member

    You could try with #1500 to see if that helps. If you have github client installed, gh pr checkout 1500 will fetch the correct branch.

  4. LXGaming commented on Feb 9, 2025

    ContributorAuthor

    Thank you for fixing that, I've attached the fixture.

    T310(US)_1.0_1.5.0.json

  5. rytilahti commented on Feb 10, 2025

    Member

    Thanks for reporting and for the fixture, this should be fixed in the next release!

  6. added a commit that references this issue on Feb 12, 2025
  7. added a commit that references this issue on Aug 31, 2025
  8. added a commit that references this issue on Oct 26, 2025
  9. added a commit that references this issue on Nov 10, 2025
  10. added a commit that references this issue on Jul 5, 2026
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

    bugSomething isn't working

    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