aboutsummaryrefslogtreecommitdiffstats
path: root/yr2pgsql.py
diff options
context:
space:
mode:
authorDennis Eriksen <d@ennis.no>2022-10-04 08:24:52 +0200
committerDennis Eriksen <d@ennis.no>2022-10-04 08:24:52 +0200
commit3575d93dd0349b1b5d5025cd2531ae9e811f5b69 (patch)
tree77f51d30d54edfd1e7dba5dbdd376696fa882b90 /yr2pgsql.py
parentadding grid tariff from elvia (diff)
downloadenergyscripts-3575d93dd0349b1b5d5025cd2531ae9e811f5b69.tar.gz
adding prefix to environmental variables
Diffstat (limited to 'yr2pgsql.py')
-rwxr-xr-xyr2pgsql.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/yr2pgsql.py b/yr2pgsql.py
index f37f0be..28bb06e 100755
--- a/yr2pgsql.py
+++ b/yr2pgsql.py
@@ -6,11 +6,11 @@ import json
import psycopg2
import requests
-lat = str(os.environ['yr_lat'])
-lon = str(os.environ['yr_lon'])
+lat = str(os.environ['el_yr_lat'])
+lon = str(os.environ['el_yr_lon'])
-pg_db = os.environ['pg_db']
-pg_host = os.environ['pg_host']
+pg_db = os.environ['el_pg_db']
+pg_host = os.environ['el_pg_host']
pg_table = "yr"
apiUrl = "https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=" + lat + "&lon=" + lon