Skip to content

Conversation

@CoMPaTech
Copy link
Contributor

@CoMPaTech CoMPaTech commented Aug 3, 2025

Proposed change

Update airOS module to 0.2.4 from 0.2.1 hence updating the exceptions

  • 0.2.4 adding the missing Enums and optional height to solve the reported issue
  • 0.2.2 unified prefix of AirOS (instead of none)

https://github.com/CoMPaTech/python-airos/blob/main/CHANGELOG.md / CoMPaTech/python-airos@v0.2.1...compatech:v0.2.4

Documentation has not been updated yet, as the LiteBeam is not confirmed working yet

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

  • This PR fixes or closes issue: fixes Ubiquiti LiteBeam 5AC #149884
  • This PR is related to issue:
  • Link to documentation pull request:
  • Link to developer documentation pull request:
  • Link to frontend pull request:

Checklist

  • 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.

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:

@specialadapter
Copy link

Cheers Tom! I will retest upon merge. You are an example to the FOSS community mate!

@joostlek joostlek changed the title BETA - Update airOS module to 0.2.4 fixing reported issue Bump python-airos to 0.2.4 Aug 4, 2025
'capabilities': dict({
'options': list([
'ap_ptp',
'ap_ptmp',
Copy link
Member

Choose a reason for hiding this comment

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

You're missing translation keys for this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Valid point, would the below make sense? (Keeping state length sensibly minimum)

+    AirOSSensorEntityDescription(
+        key="wireless_role",
+        translation_key="wireless_role",
+        device_class=SensorDeviceClass.ENUM,
+        value_fn=lambda data: data.wireless.mode.value.replace("-", "_").lower(),
+        options=WIRELESS_MODE_OPTIONS,
+    ),
     AirOSSensorEntityDescription(
         key="wireless_mode",
         translation_key="wireless_mode",

with

       "wireless_mode": {
         "name": "Wireless mode",
+        "state": {
+          "ap_ptp": "Point-to-Point",
+          "ap_ptmp": "Point-to-Multi-Point",
+          "sta_ptp": "Point-to-Point"
+        }
+      },
+      "wireless_role": {
+        "name": "Wireless role",
         "state": {
           "ap_ptp": "Access point",
+          "ap_ptmp": "Access point",
           "sta_ptp": "Station"
         }
       },

Copy link
Member

Choose a reason for hiding this comment

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

Why do we introduce a second entity?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thought about it some more reading other integrations, commit will suggest hub as terminology

Copy link
Member

Choose a reason for hiding this comment

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

Also. We should not have strings that are the same in here. As in, when someone is automating they should now pick between "access point" and "access point" and they both trigger on different data. Which is horrible to automate with this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Which is why I landed on 191aca5

          "ap_ptmp": "Access hub",
          "ap_ptp": "Access point",
          "sta_ptp": "Station"

Copy link
Member

Choose a reason for hiding this comment

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

I think we should pick the thing that the user wants and what the user recognizes. If the unifi software talks about Access point in both cases, we shouldn't invent one ourselves. Otherwise, we should map this to access_point and station while it's still in beta

Copy link
Contributor Author

@CoMPaTech CoMPaTech Aug 4, 2025

Choose a reason for hiding this comment

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

The airOS software doesn't necessarily, looked up the documentation and this has the following list:

The 2 PTMP modes are the same from the API/JSON returned, it's flagging in the Web UI when using specific bandwidths that you can't use non-ac stations. Wrt Station PTMP, I have not seen the option nor the API/JSON equivalent (probably 'st-ptmp' but we'll cross that bridge when we know what it will be.

airOS 8 supports the following wireless modes:
Access Point PTP
Access Point Point-to-MultiPoint (PtMP) airMAX ac
Access Point PtMP airMAX Mixed
Station PtP
Station PtMP

Changed to use the above naming to stay coherent with airOS documentation bd427a0

For reference, the user only sees the UI as
Scherm­afbeelding 2025-08-04 om 13 41 19

AP on = AP, off = Station
PTP on = PTP, off = PTP
"Dependent on bandwidth" = AC only (but having tried all of them, this doesn't change in the API/JSON output)

Copy link
Member

Choose a reason for hiding this comment

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

I think we need to decide what would be the easiest for the user to understand, I think we could also do binary sensors for these. Up to you. It also kinda depends on what users will use this with. As in, will people automate on the fact what mode the device is in? Or that it is in PTP mode?

Copy link
Contributor Author

@CoMPaTech CoMPaTech Aug 4, 2025

Choose a reason for hiding this comment

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

Binary sensors might make sense or eventually when we start controlling in a switch. I'll remove 'm for now so we can continue the merge and we'll bring 'm back later on.

I'll add an another docs PR to appropriately remove wireless_mode: home-assistant/home-assistant.io#40274

@CoMPaTech
Copy link
Contributor Author

Recap:

  • Removed 'wireless_mode' sensor, will be re-added as (most likely) binary_sensors at a later stage
  • Added doc removal PR
  • Changes exception and class naming all prefixed

@joostlek joostlek merged commit bfae071 into home-assistant:dev Aug 4, 2025
48 checks passed
@CoMPaTech CoMPaTech deleted the airos_litebeam branch August 4, 2025 20:36
frenck pushed a commit that referenced this pull request Aug 5, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Aug 6, 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.

Ubiquiti LiteBeam 5AC

5 participants