aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/esphomeapi.py
diff options
context:
space:
mode:
authorDennis Eriksen <d@ennis.no>2023-11-09 13:57:26 +0100
committerDennis Eriksen <d@ennis.no>2023-11-09 13:57:26 +0100
commit4ad7f2e5111ca9e27dcbe5781c87f249bc7377ad (patch)
treed605620535229e741f7e2da473086fe185f78e5f /scripts/esphomeapi.py
parentsmall fixes (diff)
downloadenergyscripts-4ad7f2e5111ca9e27dcbe5781c87f249bc7377ad.tar.gz
added new function to get env
which handles missing env better...
Diffstat (limited to 'scripts/esphomeapi.py')
-rw-r--r--scripts/esphomeapi.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/scripts/esphomeapi.py b/scripts/esphomeapi.py
index 390fbd5..40594f1 100644
--- a/scripts/esphomeapi.py
+++ b/scripts/esphomeapi.py
@@ -4,7 +4,6 @@
import argparse
import asyncio
import logging
-import os
import sys
import common
@@ -14,7 +13,7 @@ import zeroconf
from aioesphomeapi import APIClient, APIConnectionError, ReconnectLogic, SensorState
sleepsec = 60
-noise_psk = os.environ["el_esphome_api_psk"]
+noise_psk = common.env("el_esphome_api_psk")
async def main(args):