diff options
author | Dennis Eriksen <d@ennis.no> | 2023-11-09 13:57:26 +0100 |
---|---|---|
committer | Dennis Eriksen <d@ennis.no> | 2023-11-09 13:57:26 +0100 |
commit | 4ad7f2e5111ca9e27dcbe5781c87f249bc7377ad (patch) | |
tree | d605620535229e741f7e2da473086fe185f78e5f /scripts/neohub.py | |
parent | small fixes (diff) | |
download | energyscripts-4ad7f2e5111ca9e27dcbe5781c87f249bc7377ad.tar.gz |
added new function to get env
which handles missing env better...
Diffstat (limited to 'scripts/neohub.py')
-rw-r--r-- | scripts/neohub.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/neohub.py b/scripts/neohub.py index bf43859..f4c4f2b 100644 --- a/scripts/neohub.py +++ b/scripts/neohub.py @@ -2,15 +2,14 @@ """ Get stuff from neohub! This is mostly the usage-example from https://gitlab.com/neohubapi/neohubapi/ """ import asyncio -import os import time from datetime import datetime import common import neohubapi.neohub as neohub -neohub_ip = os.environ["el_neohub_ip"] -neohub_port = os.environ["el_neohub_port"] +neohub_ip = common.env("el_neohub_ip") +neohub_port = common.env("el_neohub_port") SLEEP = 120 # Sleep between runs |