diff --git a/boagent/api/api.py b/boagent/api/api.py index d775efb..ceeb66a 100644 --- a/boagent/api/api.py +++ b/boagent/api/api.py @@ -159,14 +159,14 @@ def get_metrics(start_time: float, end_time: float, verbose: bool, location: str "long_unit": "Watts" }, "electricity_carbon_intensity": { - "value": boaviztapi_data["verbose"]["USAGE-1"]["gwp_factor"]["used_value"], + "value": boaviztapi_data["verbose"]["USAGE"]["gwp_factor"]["value"], "description": "Carbon intensity of the elextricity mixed. Mix considered : {}".format(location), "type": "gauge", "unit": "kg CO2eq / kWh", "long_unit": "Kilograms CO2 equivalent per KiloWattHour" } } - usage_location_status = boaviztapi_data["verbose"]["USAGE-1"]["usage_location"]["status"] + usage_location_status = boaviztapi_data["verbose"]["USAGE"]["usage_location"]["status"] if usage_location_status == "MODIFY": res["emissions_calculation_data"]["electricity_carbon_intensity"]["description"] += " WARNING : The provided trigram doesn't match any existing country. So this result is based on average European electricity mix. Be careful with this data." elif usage_location_status == "SET": diff --git a/docker-compose.yaml b/docker-compose.yaml index 05933f7..f1e418f 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -39,7 +39,8 @@ services: - boagent-network boaviztapi: - image: ghcr.io/boavizta/boaviztapi:0.1.2 + #image: ghcr.io/boavizta/boaviztapi:0.1.2 + image: bpetit/boaviztapi:v0.1.3 ports: - "5000:5000" networks: