Skip to content

Commit e4ad2ca

Browse files
committed
Improvements and CRAI suggestions
1 parent 057e5d2 commit e4ad2ca

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

airos/airos8.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ async def login(self) -> bool:
187187
logger.exception("Error during login")
188188
raise DeviceConnectionError from err
189189

190-
async def status(self, return_json: bool = False) -> dict:
190+
async def status(self, return_json: bool = False) -> dict | AirOSData:
191191
"""Retrieve status from the device."""
192192
if not self.connected:
193193
logger.error("Not connected, login first")
@@ -210,9 +210,7 @@ async def status(self, return_json: bool = False) -> dict:
210210
try:
211211
airos_data = AirOSData.from_dict(response_json)
212212
except (MissingField, InvalidFieldValue) as err:
213-
logger.exception(
214-
"Source data missing 'host' or 'device_id' keys"
215-
)
213+
logger.exception("Failed to deserialize AirOS data")
216214
raise KeyDataMissingError from err
217215

218216
# Show new enums detected

0 commit comments

Comments
 (0)