Skip to content

Commit 82d1d8c

Browse files
committed
Fix regression and add logging
1 parent dfd5469 commit 82d1d8c

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

airos/base.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,19 @@ def _derived_data_helper(
128128
try:
129129
sku = UispAirOSProductMapper().get_sku_by_devmodel(devmodel)
130130
except KeyError:
131+
_LOGGER.warning(
132+
"Unknown SKU/Model ID for %s. Please report at "
133+
"https://github.com/CoMPaTech/python-airos/issues so we can add support.",
134+
devmodel,
135+
)
131136
sku = "UNKNOWN"
132137
except AirOSMultipleMatchesFoundException as err: # pragma: no cover
133-
_LOGGER.warning("Multiple matches found for model '%s': %s", devmodel, err)
138+
_LOGGER.warning(
139+
"Multiple SKU/Model ID matches found for model '%s': %s. Please report at "
140+
"https://github.com/CoMPaTech/python-airos/issues so we can add support.",
141+
devmodel,
142+
err,
143+
)
134144
sku = "AMBIGUOUS"
135145

136146
derived: dict[str, Any] = {
@@ -193,7 +203,7 @@ def _get_authenticated_headers(
193203
if self._csrf_id: # pragma: no cover
194204
headers["X-CSRF-ID"] = self._csrf_id
195205

196-
if self._csrf_id: # pragma: no cover
206+
if self._auth_cookie: # pragma: no cover
197207
headers["Cookie"] = f"AIROS_{self._auth_cookie}"
198208

199209
return headers

0 commit comments

Comments
 (0)