Closed dan-s-github closed 11 months ago
Reorganised the extraction of the json response values to prevent the NoneType exceptions that occur at midnight local time.
2023-11-22 00:03:14.647 ERROR (MainThread) [custom_components.alphaess] Unexpected error fetching alphaess data: 'NoneType' object has no attribute 'get' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/alphaess/coordinator.py", line 45, in _async_update_data _pv = _onedateenergy.get("epv") ^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'get'
Reorganised the extraction of the json response values to prevent the NoneType exceptions that occur at midnight local time.