From 4ad7f2e5111ca9e27dcbe5781c87f249bc7377ad Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Thu, 9 Nov 2023 13:57:26 +0100 Subject: added new function to get env which handles missing env better... --- scripts/esphomeapi.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'scripts/esphomeapi.py') 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): -- cgit v1.2.3