Write Enphase Envoy data to log when in debug mode (#105456)

pull/105633/head
Arie Catsman 2023-12-13 09:22:10 +01:00 committed by GitHub
parent 5dbd0dede1
commit c318445a76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -144,7 +144,10 @@ class EnphaseUpdateCoordinator(DataUpdateCoordinator[dict[str, Any]]):
if not self._setup_complete:
await self._async_setup_and_authenticate()
self._async_mark_setup_complete()
return (await envoy.update()).raw
# dump all received data in debug mode to assist troubleshooting
envoy_data = await envoy.update()
_LOGGER.debug("Envoy data: %s", envoy_data)
return envoy_data.raw
except INVALID_AUTH_ERRORS as err:
if self._setup_complete and tries == 0:
# token likely expired or firmware changed, try to re-authenticate