From 99e3364df23825049b4f60244a8da8ac3cd04468 Mon Sep 17 00:00:00 2001 From: Patrick Romowicz Date: Wed, 4 Dec 2024 15:22:16 +0100 Subject: [PATCH 1/2] 5G extension restore Add functionality to restore the 5G extension --- speedport/api.py | 9 +++++++++ speedport/speedport.py | 3 +++ 2 files changed, 12 insertions(+) diff --git a/speedport/api.py b/speedport/api.py index 0290d5c..5682afa 100644 --- a/speedport/api.py +++ b/speedport/api.py @@ -171,6 +171,15 @@ async def reconnect(self): "html/content/internet/con_ipdata.html", ) + @need_auth + async def ex5g_restore(self): + _LOGGER.info("Restore 5G extension...") + await self.api.post( + "data/LTE.json", + { "restore": "true" }, + "html/content/internet/lte_firmware.html", + ) + @need_auth async def reboot(self): _LOGGER.info("Reboot speedport...") diff --git a/speedport/speedport.py b/speedport/speedport.py index 841ea43..950e4c0 100644 --- a/speedport/speedport.py +++ b/speedport/speedport.py @@ -107,6 +107,9 @@ async def wps_on(self): async def reconnect(self): await self.api.reconnect() + async def ex5g_restore(self): + await self.api.ex5g_restore() + async def reboot(self): await self.api.reboot() From b0c7f9a6e4615f8e257644f523c619def50d0705 Mon Sep 17 00:00:00 2001 From: Patrick Romowicz Date: Wed, 4 Dec 2024 15:25:40 +0100 Subject: [PATCH 2/2] reformat code.... --- speedport/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/speedport/api.py b/speedport/api.py index 5682afa..8ff6c08 100644 --- a/speedport/api.py +++ b/speedport/api.py @@ -176,7 +176,7 @@ async def ex5g_restore(self): _LOGGER.info("Restore 5G extension...") await self.api.post( "data/LTE.json", - { "restore": "true" }, + {"restore": "true"}, "html/content/internet/lte_firmware.html", )