diff options
author | Dennis Eriksen <d@ennis.no> | 2023-04-14 15:05:39 +0200 |
---|---|---|
committer | Dennis Eriksen <d@ennis.no> | 2023-04-14 15:05:39 +0200 |
commit | 69563c74b4e981062c3ded27774d3ecfbbc9b567 (patch) | |
tree | f193789f7a2757fa3c668ba38f30a4bea2329aa3 /scripts/esphomeapi.py | |
parent | send mqtt and neohub to new states-table (diff) | |
download | energyscripts-69563c74b4e981062c3ded27774d3ecfbbc9b567.tar.gz |
adding client name and a sleep to prevent quicklooping
Diffstat (limited to 'scripts/esphomeapi.py')
-rw-r--r-- | scripts/esphomeapi.py | 2 |
1 files changed, 2 insertions, 0 deletions
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, |