From 69563c74b4e981062c3ded27774d3ecfbbc9b567 Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Fri, 14 Apr 2023 15:05:39 +0200 Subject: adding client name and a sleep to prevent quicklooping --- scripts/esphomeapi.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts/esphomeapi.py') diff --git a/scripts/esphomeapi.py b/scripts/esphomeapi.py index e0cbc67..57f4ebc 100644 --- a/scripts/esphomeapi.py +++ b/scripts/esphomeapi.py @@ -25,6 +25,7 @@ async def main(args): address=args.address, port=6053, password='', + client_info="esphomeapi.py", noise_psk=noise_psk) log.debug('Connecting') @@ -84,6 +85,7 @@ async def main(args): async def on_disconnect() -> None: log.debug('function on_disconnect()') log.warning("Disconnected from API") + await asyncio.sleep(sleepsec) reconnect = ReconnectLogic( client=api, -- cgit v1.2.3