openviess/PyViCare

DEVICE_COMMUNICATION_ERROR

Opened this issue · 1 comments

From time to time I see PyViCareInvalidDataError in HA. It would be nice if this would be detected as gateway being offline and setting the state respectively instead of failing.

Invalid data from Vicare server: {'viErrorId': '|00-bc04a79ce06442efa7a77de4e7287029-f22ac2b8491e4b09-01.d35d83cd_', 'statusCode': 400, 'errorType': 'DEVICE_COMMUNICATION_ERROR', 'message': '', 'extendedPayload': {'httpStatusCode': 'NotFound', 'code': '404', 'reason': 'GATEWAY_OFFLINE'}}

File "/usr/local/lib/python3.12/site-packages/PyViCare/PyViCareUtils.py", line 55, in feature_flag_wrapper
File "/usr/local/lib/python3.12/site-packages/PyViCare/PyViCareUtils.py", line 48, in wrapper
File "/usr/local/lib/python3.12/site-packages/PyViCare/PyViCareHeatingDevice.py", line 275, in getOneTimeCharge
File "/usr/local/lib/python3.12/site-packages/PyViCare/PyViCareCachedService.py", line 24, in getProperty
File "/usr/local/lib/python3.12/site-packages/PyViCare/PyViCareCachedService.py", line 45, in __get_or_update_cache
raise PyViCareInvalidDataError(data)
PyViCare.PyViCareUtils.PyViCareInvalidDataError: {'viErrorId': '|00-e744956cbcfa402891faefbc36cc12ad-9054a3fcbabb49d7-01.58eacb96_', 'statusCode': 400, 'errorType': 'DEVICE_COMMUNICATION_ERROR', 'message': '', 'extendedPayload': {'httpStatusCode': 'NotFound', 'code': '404', 'reason': 'GATEWAY_OFFLINE'}}
2024-07-08 05:48:41.924 ERROR (SyncWorker_0) [ViCare] Missing 'data' property when fetching data.
2024-07-08 05:48:41.913 ERROR (MainThread) [homeassistant.components.climate] Error while setting up vicare platform for climate