Skip to content

Commit 317e719

Browse files
author
Sven ten Raa
committed
Do not override parsed data if a request failed
1 parent 2d2edae commit 317e719

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

custom_components/victron/coordinator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ async def _async_update_data(self) -> dict:
6464
#TODO safety check if result is actual data if not unavailable
6565
if data.isError():
6666
#raise error
67+
#TODO change this to work with partial updates
68+
parsed_data = self.data["data"]
6769
_LOGGER.error("no valid data returned for entities")
6870
else:
6971
parsed_data = OrderedDict(list(parsed_data.items()) + list(self.parse_register_data(data, register_info_dict[name], unit).items()))

0 commit comments

Comments
 (0)