Skip to content

Commit 6972285

Browse files
committed
chore: bleedling edgedly upgrading to boaviztapi 0.2
1 parent e0a3764 commit 6972285

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

boagent/api/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,14 @@ def get_metrics(start_time: float, end_time: float, verbose: bool, location: str
159159
"long_unit": "Watts"
160160
},
161161
"electricity_carbon_intensity": {
162-
"value": boaviztapi_data["verbose"]["USAGE-1"]["gwp_factor"]["used_value"],
162+
"value": boaviztapi_data["verbose"]["USAGE"]["gwp_factor"]["value"],
163163
"description": "Carbon intensity of the elextricity mixed. Mix considered : {}".format(location),
164164
"type": "gauge",
165165
"unit": "kg CO2eq / kWh",
166166
"long_unit": "Kilograms CO2 equivalent per KiloWattHour"
167167
}
168168
}
169-
usage_location_status = boaviztapi_data["verbose"]["USAGE-1"]["usage_location"]["status"]
169+
usage_location_status = boaviztapi_data["verbose"]["USAGE"]["usage_location"]["status"]
170170
if usage_location_status == "MODIFY":
171171
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."
172172
elif usage_location_status == "SET":

docker-compose.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ services:
3939
- boagent-network
4040

4141
boaviztapi:
42-
image: ghcr.io/boavizta/boaviztapi:0.1.2
42+
#image: ghcr.io/boavizta/boaviztapi:0.1.2
43+
image: bpetit/boaviztapi:v0.1.3
4344
ports:
4445
- "5000:5000"
4546
networks:

0 commit comments

Comments
 (0)