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

This commit is contained in:
Arie Catsman 2023-12-13 09:22:10 +01:00 committed by Franck Nijhof
parent 0683b8be21
commit 3b7add533b
No known key found for this signature in database
GPG key ID: D62583BA8AB11CA3

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