aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDennis Eriksen <d@ennis.no>2023-04-14 15:05:39 +0200
committerDennis Eriksen <d@ennis.no>2023-04-14 15:05:39 +0200
commit69563c74b4e981062c3ded27774d3ecfbbc9b567 (patch)
treef193789f7a2757fa3c668ba38f30a4bea2329aa3 /scripts
parentsend mqtt and neohub to new states-table (diff)
downloadenergyscripts-69563c74b4e981062c3ded27774d3ecfbbc9b567.tar.gz
adding client name and a sleep to prevent quicklooping
Diffstat (limited to 'scripts')
-rw-r--r--scripts/esphomeapi.py2
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,