diff --git a/co2_emission/co2_emission.py b/co2_emission/co2_emission.py index fd3188c..fd98923 100644 --- a/co2_emission/co2_emission.py +++ b/co2_emission/co2_emission.py @@ -40,6 +40,8 @@ class Co2Emission: for energy_system in self._building.energy_systems: fuel_type = energy_system.generation_system.generic_generation_system.fuel_type for demand_type in energy_system.demand_types: + if demand_type == cte.ELECTRICITY: + continue results_by_time_period = {} if demand_type == cte.HEATING: for time_period in self._building.heating_consumption: @@ -64,7 +66,7 @@ class Co2Emission: results_by_time_period = {} for time_period in self._building.lighting_electrical_demand: values = [] - for value in self._building.lighting_electrical_demand[time_period]: + for value in self._building.lighting_electrical_demand[time_period]['insel meb']: values.append(value * self._emissions_factor[cte.ELECTRICITY]) results_by_time_period[time_period] = values results[cte.LIGHTING] = results_by_time_period @@ -72,7 +74,7 @@ class Co2Emission: results_by_time_period = {} for time_period in self._building.appliances_electrical_demand: values = [] - for value in self._building.appliances_electrical_demand[time_period]: + for value in self._building.appliances_electrical_demand[time_period]['insel meb']: values.append(value * self._emissions_factor[cte.ELECTRICITY]) results_by_time_period[time_period] = values results[cte.APPLIANCES] = results_by_time_period