Skip to content

Bump aiounifi to 88#156867

Merged
edenhaus merged 2 commits into
home-assistant:devfrom
Sese-Schneider:Sese-Schneider-patch-1
Nov 19, 2025
Merged

Bump aiounifi to 88#156867
edenhaus merged 2 commits into
home-assistant:devfrom
Sese-Schneider:Sese-Schneider-patch-1

Conversation

@Sese-Schneider
Copy link
Copy Markdown
Contributor

@Sese-Schneider Sese-Schneider commented Nov 19, 2025

Proposed change

Fixes a TypeError in the UniFi LED brightness control.

Stacktrace
[31m2025-11-06 10:03:52.668 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [546689866048] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 270, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<7 lines>...
    )
    ^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2816, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2859, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 830, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
        hass, entity, func, data, call.context
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 902, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 651, in async_handle_light_on_service
    await light.async_turn_on(**filter_turn_on_params(light, params))
  File "/usr/src/homeassistant/homeassistant/components/unifi/light.py", line 140, in async_turn_on
    await self.entity_description.control_fn(self.hub, self._obj_id, True, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/unifi/light.py", line 72, in async_device_led_control_fn
    DeviceSetLedStatus.create(
    ~~~~~~~~~~~~~~~~~~~~~~~~~^
        device=device,
        ^^^^^^^^^^^^^^
    ...<2 lines>...
        color=color,
        ^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/aiounifi/models/device.py", line 847, in create
    if not (0 <= brightness <= 100):
            ^^^^^^^^^^^^^^^^^^^^^^

Related:

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

Copilot AI review requested due to automatic review settings November 19, 2025 09:54
@home-assistant
Copy link
Copy Markdown
Contributor

Hey there @Kane610, mind taking a look at this pull request as it has been labeled with an integration (unifi) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of unifi can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign unifi Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a TypeError in the UniFi LED brightness control by upgrading the aiounifi dependency from version 87 to 88, which includes an upstream fix for brightness value validation.

  • Upgrades aiounifi library dependency from v87 to v88
  • Addresses TypeError when setting LED brightness due to library-level validation issues
  • No Home Assistant code changes required as the fix is in the upstream library

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
requirements_test_all.txt Updates aiounifi test dependency to version 88
requirements_all.txt Updates aiounifi production dependency to version 88
homeassistant/components/unifi/manifest.json Updates aiounifi requirement in UniFi integration manifest to version 88

@epenet epenet changed the title Fix TypeError in UniFi LED brightness control Bump aiounifi to 88 Nov 19, 2025
@TheJulianJES TheJulianJES added this to the 2025.11.3 milestone Nov 19, 2025
Copy link
Copy Markdown
Member

@TheJulianJES TheJulianJES left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@edenhaus edenhaus merged commit a19be19 into home-assistant:dev Nov 19, 2025
129 of 130 checks passed
@Sese-Schneider Sese-Schneider deleted the Sese-Schneider-patch-1 branch November 19, 2025 12:43
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unifi E7 LED turned off once... now error.

6 participants