File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ def __init__(
5252 self ._status_cgi_url = f"{ self .base_url } /status.cgi" # AirOS 8
5353 self ._stakick_cgi_url = f"{ self .base_url } /stakick.cgi" # AirOS 8
5454 self .current_csrf_token = None
55+ self .warnings_cache = []
5556
5657 self ._use_json_for_login_post = False
5758
@@ -213,12 +214,14 @@ async def status(self) -> AirOSData:
213214 logger .exception ("Failed to deserialize AirOS data" )
214215 raise KeyDataMissingError from err
215216
216- # Show new enums detected
217+ # Show new enums detected, once after (each) startup
217218 if airos_data .warnings :
218219 for field_name , messages in airos_data .warnings .items ():
219220 for msg in messages :
220221 log = f"AirOS data warning for field '{ field_name } ': { msg } "
221- logger .warning (log )
222+ if log not in self .warnings_cache :
223+ self .warnings_cache .append (log )
224+ logger .warning (log )
222225
223226 return airos_data
224227 except json .JSONDecodeError :
Original file line number Diff line number Diff line change 1010class IeeeMode (Enum ):
1111 """Enum definition."""
1212
13+ AUTO = "AUTO"
1314 _11ACVHT80 = "11ACVHT80"
1415 # More to be added when known
1516
@@ -420,7 +421,7 @@ def check_for_warnings(self):
420421 if hasattr (station .remote , "mode" ) and isinstance (station .remote .mode , str ):
421422 self .add_warning (
422423 f"wireless.sta[{ i } ].remote" ,
423- f"Unknown (new) remote mode: '{ station .remote .mode } '" ,
424+ f"Unknown (new) remote mode: '{ station .remote .mode } ', please report to the CODEOWNERS for inclusion " ,
424425 )
425426
426427 def add_warning (self , field_name : str , message : str ):
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44
55[project ]
66name = " airos"
7- version = " 0.1.3 "
7+ version = " 0.1.4 "
88license = " MIT"
99description = " Ubiquity airOS module(s) for Python 3."
1010readme = " README.md"
You can’t perform that action at this time.
0 commit comments