Skip to content

Commit 9095951

Browse files
committed
Changed logging level of several messages
1 parent 275c478 commit 9095951

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

custom_components/daikin_residential/daikin_api.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class DaikinApi:
3333

3434
def __init__(self, hass, entry):
3535
"""Initialize a new Daikin Residential API."""
36-
_LOGGER.info("Initialing Daikin Residential API...")
36+
_LOGGER.debug("Initialing Daikin Residential API...")
3737
self.hass = hass
3838
self._config_entry = entry
3939
self.tokenSet = None
@@ -95,7 +95,7 @@ async def doBearerRequest(self, resourceUrl, options=None, refreshed=False):
9595
return True
9696

9797
if not refreshed and res.status_code == 401:
98-
_LOGGER.info("TOKEN EXPIRED: will refresh it (%s)", res.status_code)
98+
_LOGGER.debug("TOKEN EXPIRED: will refresh it (%s)", res.status_code)
9999
await self.refreshAccessToken()
100100
return await self.doBearerRequest(resourceUrl, options, True)
101101

@@ -122,8 +122,8 @@ async def refreshAccessToken(self):
122122
# res = requests.post(url, headers=headers, json=ref_json)
123123
except Exception as e:
124124
_LOGGER.error("REQUEST FAILED: %s", e)
125-
_LOGGER.info("refreshAccessToken response code: %s", res.status_code)
126-
_LOGGER.debug("REFRESHACCESSTOKEN RESPONSE: %s", res.json())
125+
_LOGGER.debug("refreshAccessToken response code: %s", res.status_code)
126+
_LOGGER.debug("refreshAccessToken response: %s", res.json())
127127
res_json = res.json()
128128
data = self._config_entry.data.copy()
129129

@@ -143,12 +143,12 @@ async def refreshAccessToken(self):
143143
self.hass.config_entries.async_update_entry(
144144
entry=self._config_entry, data=data
145145
)
146-
_LOGGER.info("TokenSet refreshed.")
147-
_LOGGER.debug("TOKENSET REFRESHED: %s", self._config_entry.data)
146+
_LOGGER.debug("TokenSet refreshed.")
147+
# _LOGGER.debug("TOKENSET REFRESHED: %s", self._config_entry.data)
148148

149149
return self.tokenSet
150150

151-
_LOGGER.info(
151+
_LOGGER.warning(
152152
"CANNOT REFRESH TOKENSET (%s): will login again "
153153
+ "and retrieve a new tokenSet.",
154154
res.status_code,
@@ -471,7 +471,7 @@ async def getCloudDevices(self):
471471
device = Appliance(dev_data, self)
472472
device_model = device.get_value("gateway", "modelInfo")
473473
if device_model is None:
474-
_LOGGER.info("Device '%s' is filtered out", device_model)
474+
_LOGGER.warning("Device '%s' is filtered out", device_model)
475475
else:
476476
res[dev_data["id"]] = device
477477
return res

0 commit comments

Comments
 (0)