From dc5460f5914818fdea4828d9730a3d7e95678331 Mon Sep 17 00:00:00 2001 From: atse Date: Tue, 27 Aug 2024 17:08:11 +0800 Subject: [PATCH] aioclient: Add missing readline for saving Saving all channels returns multiple JSON objects, read the extra {}. --- pytec/pytec/aioclient.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pytec/pytec/aioclient.py b/pytec/pytec/aioclient.py index eb5b9bc..02c2a73 100644 --- a/pytec/pytec/aioclient.py +++ b/pytec/pytec/aioclient.py @@ -218,6 +218,8 @@ class AsyncioClient: async def save_config(self, channel=""): """Save current configuration to EEPROM""" await self._command("save", str(channel)) + if channel == "": + await self._read_line() # Read the extra {} async def load_config(self, channel=""): """Load current configuration from EEPROM"""