-
-
Notifications
You must be signed in to change notification settings - Fork 35.8k
Bump python-airos to 0.2.4 #149885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump python-airos to 0.2.4 #149885
Conversation
|
Cheers Tom! I will retest upon merge. You are an example to the FOSS community mate! |
| 'capabilities': dict({ | ||
| 'options': list([ | ||
| 'ap_ptp', | ||
| 'ap_ptmp', |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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"
}
},
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
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)
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
|
Recap:
|
Proposed change
Update airOS module to 0.2.4 from 0.2.1 hence updating the exceptions
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
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: