diff options
Diffstat (limited to 'scripts/elvia_gridtariff.py')
-rw-r--r-- | scripts/elvia_gridtariff.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/elvia_gridtariff.py b/scripts/elvia_gridtariff.py index 98164bb..4475c48 100644 --- a/scripts/elvia_gridtariff.py +++ b/scripts/elvia_gridtariff.py @@ -1,7 +1,6 @@ #!/usr/bin/python3 """ get grid tariffs""" -import os import sys from datetime import datetime, timedelta @@ -11,9 +10,9 @@ from tzlocal import get_localzone # API documentation: https://elvia.portal.azure-api.net/docs/services/gridtariffapi/operations/post-digin-api-v-tariffquery-meteringpointsgridtariffs? -apiKey = os.environ["el_elvia_grid_api_key"] +apiKey = common.env("el_elvia_grid_api_key") apiUrl = "https://elvia.azure-api.net/grid-tariff/digin/api/1/tariffquery/meteringpointsgridtariffs" -meteringPointId = os.environ["el_meteringPointId"] +meteringPointId = common.env("el_meteringPointId") startTime = datetime.now(get_localzone()) - timedelta(days=2) startTime = startTime.strftime("%Y-%m-%d") |