I figured it out. logger: instead of logging:
Also, similar logging results:
2023-11-05 14:34:10.691 INFO (MainThread) [aiophyn.mqtt] Creating timer
2023-11-05 14:34:10.691 INFO (MainThread) [aiophyn.api] Auhenticating to Kohler
2023-11-05 14:34:10.692 DEBUG (MainThread) [aiophyn.partners.kohler] Logging into Kohler
2023-11-05 14:34:12.724 DEBUG (MainThread) [aiophyn.partners.kohler] Received Kohler Token
2023-11-05 14:34:12.724 INFO (MainThread) [aiophyn.partners.kohler] Getting Kohler settings from Phyn
2023-11-05 14:34:16.711 DEBUG (MainThread) [aiophyn.partners.kohler] Getting token from Phyn
2023-11-05 14:34:18.982 DEBUG (MainThread) [aiophyn.partners.kohler] Token received
2023-11-05 14:34:18.997 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File “/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py”, line 433, in _handle_request
resp = await request_handler(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py”, line 504, in _handle
resp = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/aiohttp/web_middlewares.py”, line 117, in impl
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/http/security_filter.py”, line 85, in security_filter_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/http/forwarded.py”, line 100, in forwarded_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/http/request_context.py”, line 28, in request_context_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/http/ban.py”, line 80, in ban_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/http/auth.py”, line 236, in auth_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/http/headers.py”, line 31, in headers_middleware
response = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/http/view.py”, line 148, in handle
result = await handler(request, **request.match_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/http/decorators.py”, line 63, in with_admin
return await func(self, request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/config/config_entries.py”, line 177, in post
return await super().post(request, flow_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/http/data_validator.py”, line 72, in wrapper
result = await method(view, request, data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py”, line 110, in post
result = await self._flow_mgr.async_configure(flow_id, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 293, in async_configure
result = await self._async_handle_step(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 389, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/config/custom_components/phyn/config_flow.py”, line 52, in async_step_user
info = await validate_input(self.hass, user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/config/custom_components/phyn/config_flow.py”, line 29, in validate_input
api = await async_get_api(
^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/aiophyn/api.py”, line 192, in async_get_api
await api.async_authenticate()
File “/usr/local/lib/python3.11/site-packages/aiophyn/api.py”, line 142, in async_authenticate
await self._partner_api.authenticate()
File “/usr/local/lib/python3.11/site-packages/aiophyn/partners/kohler.py”, line 59, in authenticate
self._phyn_password = await self.token_to_password(token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/aiophyn/partners/kohler.py”, line 198, in token_to_password
return unpad(cipher.decrypt(bytearray.fromhex(ct)), AES.block_size).decode()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/Crypto/Util/Padding.py”, line 92, in unpad
raise ValueError(“Padding is incorrect.”)
ValueError: Padding is incorrect.