diff --git a/myems-aggregation/combined_equipment_energy_input_category.py b/myems-aggregation/combined_equipment_energy_input_category.py index ad0ad5bc..b6cde1ad 100644 --- a/myems-aggregation/combined_equipment_energy_input_category.py +++ b/myems-aggregation/combined_equipment_energy_input_category.py @@ -458,7 +458,7 @@ def worker(combined_equipment): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all virtual meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -472,7 +472,7 @@ def worker(combined_equipment): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all offline meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: for meter_id, energy_hourly in energy_offline_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -486,7 +486,7 @@ def worker(combined_equipment): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all equipments...") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_equipment_hourly is not None and len(energy_equipment_hourly) > 0: for equipment_id, energy_hourly in energy_equipment_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: diff --git a/myems-aggregation/combined_equipment_energy_input_item.py b/myems-aggregation/combined_equipment_energy_input_item.py index 82a39c72..e7b1ddf8 100644 --- a/myems-aggregation/combined_equipment_energy_input_item.py +++ b/myems-aggregation/combined_equipment_energy_input_item.py @@ -461,7 +461,7 @@ def worker(combined_equipment): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all virtual meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -475,7 +475,7 @@ def worker(combined_equipment): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all offline meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: for meter_id, energy_hourly in energy_offline_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -489,7 +489,7 @@ def worker(combined_equipment): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all equipments") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_equipment_hourly is not None and len(energy_equipment_hourly) > 0: for equipment_id, energy_hourly in energy_equipment_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: diff --git a/myems-aggregation/combined_equipment_energy_output_category.py b/myems-aggregation/combined_equipment_energy_output_category.py index d73e442e..928921ad 100644 --- a/myems-aggregation/combined_equipment_energy_output_category.py +++ b/myems-aggregation/combined_equipment_energy_output_category.py @@ -458,7 +458,7 @@ def worker(combined_equipment): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all virtual meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -472,7 +472,7 @@ def worker(combined_equipment): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all offline meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: for meter_id, energy_hourly in energy_offline_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -486,7 +486,7 @@ def worker(combined_equipment): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all equipments...") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_equipment_hourly is not None and len(energy_equipment_hourly) > 0: for equipment_id, energy_hourly in energy_equipment_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: diff --git a/myems-aggregation/equipment_energy_input_category.py b/myems-aggregation/equipment_energy_input_category.py index a7c06d34..336857f8 100644 --- a/myems-aggregation/equipment_energy_input_category.py +++ b/myems-aggregation/equipment_energy_input_category.py @@ -388,7 +388,7 @@ def worker(equipment): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all virtual meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -402,7 +402,7 @@ def worker(equipment): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all offline meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: for meter_id, energy_hourly in energy_offline_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: diff --git a/myems-aggregation/equipment_energy_input_item.py b/myems-aggregation/equipment_energy_input_item.py index 22bf1e8c..67c1728f 100644 --- a/myems-aggregation/equipment_energy_input_item.py +++ b/myems-aggregation/equipment_energy_input_item.py @@ -391,7 +391,7 @@ def worker(equipment): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all virtual meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -405,7 +405,7 @@ def worker(equipment): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all offline meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: for meter_id, energy_hourly in energy_offline_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: diff --git a/myems-aggregation/equipment_energy_output_category.py b/myems-aggregation/equipment_energy_output_category.py index 12e59c5d..0db94d7c 100644 --- a/myems-aggregation/equipment_energy_output_category.py +++ b/myems-aggregation/equipment_energy_output_category.py @@ -388,7 +388,7 @@ def worker(equipment): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all virtual meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -402,7 +402,7 @@ def worker(equipment): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all offline meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: for meter_id, energy_hourly in energy_offline_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: diff --git a/myems-aggregation/shopfloor_energy_input_category.py b/myems-aggregation/shopfloor_energy_input_category.py index 72f0289e..8011731d 100644 --- a/myems-aggregation/shopfloor_energy_input_category.py +++ b/myems-aggregation/shopfloor_energy_input_category.py @@ -455,7 +455,7 @@ def worker(shopfloor): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all virtual meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -469,7 +469,7 @@ def worker(shopfloor): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all offline meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: for meter_id, energy_hourly in energy_offline_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -483,7 +483,7 @@ def worker(shopfloor): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all equipments...") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_equipment_hourly is not None and len(energy_equipment_hourly) > 0: for equipment_id, energy_hourly in energy_equipment_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: diff --git a/myems-aggregation/shopfloor_energy_input_item.py b/myems-aggregation/shopfloor_energy_input_item.py index d704c322..706a5a88 100644 --- a/myems-aggregation/shopfloor_energy_input_item.py +++ b/myems-aggregation/shopfloor_energy_input_item.py @@ -458,7 +458,7 @@ def worker(shopfloor): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all virtual meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -472,7 +472,7 @@ def worker(shopfloor): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all offline meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: for meter_id, energy_hourly in energy_offline_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -486,7 +486,7 @@ def worker(shopfloor): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all equipments...") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_equipment_hourly is not None and len(energy_equipment_hourly) > 0: for equipment_id, energy_hourly in energy_equipment_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: diff --git a/myems-aggregation/space_energy_input_category.py b/myems-aggregation/space_energy_input_category.py index bf69efdc..ec09ff81 100644 --- a/myems-aggregation/space_energy_input_category.py +++ b/myems-aggregation/space_energy_input_category.py @@ -802,7 +802,7 @@ def worker(space): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all virtual meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -816,7 +816,7 @@ def worker(space): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all offline meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: for meter_id, energy_hourly in energy_offline_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -830,7 +830,7 @@ def worker(space): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all combined equipments") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_combined_equipment_hourly is not None and len(energy_combined_equipment_hourly) > 0: for combined_equipment_id, energy_hourly in energy_combined_equipment_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -844,7 +844,7 @@ def worker(space): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all equipments") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_equipment_hourly is not None and len(energy_equipment_hourly) > 0: for equipment_id, energy_hourly in energy_equipment_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -858,7 +858,7 @@ def worker(space): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all shopfloors") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_shopfloor_hourly is not None and len(energy_shopfloor_hourly) > 0: for shopfloor_id, energy_hourly in energy_shopfloor_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -872,7 +872,7 @@ def worker(space): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all stores") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_store_hourly is not None and len(energy_store_hourly) > 0: for store_id, energy_hourly in energy_store_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -886,7 +886,7 @@ def worker(space): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all tenants") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_tenant_hourly is not None and len(energy_tenant_hourly) > 0: for tenant_id, energy_hourly in energy_tenant_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -900,7 +900,7 @@ def worker(space): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all child spaces") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_child_space_hourly is not None and len(energy_child_space_hourly) > 0: for child_space_id, energy_hourly in energy_child_space_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: diff --git a/myems-aggregation/space_energy_input_item.py b/myems-aggregation/space_energy_input_item.py index d094e524..e6e59380 100644 --- a/myems-aggregation/space_energy_input_item.py +++ b/myems-aggregation/space_energy_input_item.py @@ -804,7 +804,7 @@ def worker(space): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all virtual meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -818,7 +818,7 @@ def worker(space): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all offline meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: for meter_id, energy_hourly in energy_offline_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -832,7 +832,7 @@ def worker(space): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all combined equipments") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_combined_equipment_hourly is not None and len(energy_combined_equipment_hourly) > 0: for combined_equipment_id, energy_hourly in energy_combined_equipment_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -846,7 +846,7 @@ def worker(space): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all equipments") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_equipment_hourly is not None and len(energy_equipment_hourly) > 0: for equipment_id, energy_hourly in energy_equipment_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -860,7 +860,7 @@ def worker(space): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all shopfloors") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_shopfloor_hourly is not None and len(energy_shopfloor_hourly) > 0: for shopfloor_id, energy_hourly in energy_shopfloor_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -874,7 +874,7 @@ def worker(space): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all stores") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_store_hourly is not None and len(energy_store_hourly) > 0: for store_id, energy_hourly in energy_store_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -888,7 +888,7 @@ def worker(space): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all tenants") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_tenant_hourly is not None and len(energy_tenant_hourly) > 0: for tenant_id, energy_hourly in energy_tenant_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -902,7 +902,7 @@ def worker(space): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all child spaces") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_child_space_hourly is not None and len(energy_child_space_hourly) > 0: for child_space_id, energy_hourly in energy_child_space_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: diff --git a/myems-aggregation/space_energy_output_category.py b/myems-aggregation/space_energy_output_category.py index cf2886ba..6cdada45 100644 --- a/myems-aggregation/space_energy_output_category.py +++ b/myems-aggregation/space_energy_output_category.py @@ -380,7 +380,7 @@ def worker(space): common_end_datetime_utc = end_datetime_utc print("Getting common time slot of energy values for all combined equipments") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_combined_equipment_hourly is not None and len(energy_combined_equipment_hourly) > 0: for combined_equipment_id, energy_hourly in energy_combined_equipment_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -394,7 +394,7 @@ def worker(space): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all equipments...") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_equipment_hourly is not None and len(energy_equipment_hourly) > 0: for equipment_id, energy_hourly in energy_equipment_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -408,7 +408,7 @@ def worker(space): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all child spaces...") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_child_space_hourly is not None and len(energy_child_space_hourly) > 0: for child_space_id, energy_hourly in energy_child_space_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: diff --git a/myems-aggregation/store_energy_input_category.py b/myems-aggregation/store_energy_input_category.py index 96dab648..7b929785 100644 --- a/myems-aggregation/store_energy_input_category.py +++ b/myems-aggregation/store_energy_input_category.py @@ -385,7 +385,7 @@ def worker(store): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all virtual meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -399,7 +399,7 @@ def worker(store): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all offline meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: for meter_id, energy_hourly in energy_offline_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: diff --git a/myems-aggregation/store_energy_input_item.py b/myems-aggregation/store_energy_input_item.py index 3cea655e..8dd0e158 100644 --- a/myems-aggregation/store_energy_input_item.py +++ b/myems-aggregation/store_energy_input_item.py @@ -388,7 +388,7 @@ def worker(store): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all virtual meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -402,7 +402,7 @@ def worker(store): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all offline meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: for meter_id, energy_hourly in energy_offline_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: diff --git a/myems-aggregation/tenant_energy_input_category.py b/myems-aggregation/tenant_energy_input_category.py index 9e21be65..ba7c8890 100644 --- a/myems-aggregation/tenant_energy_input_category.py +++ b/myems-aggregation/tenant_energy_input_category.py @@ -385,7 +385,7 @@ def worker(tenant): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all virtual meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -399,7 +399,7 @@ def worker(tenant): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all offline meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: for meter_id, energy_hourly in energy_offline_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: diff --git a/myems-aggregation/tenant_energy_input_item.py b/myems-aggregation/tenant_energy_input_item.py index 99220c9a..4edd5bb2 100644 --- a/myems-aggregation/tenant_energy_input_item.py +++ b/myems-aggregation/tenant_energy_input_item.py @@ -388,7 +388,7 @@ def worker(tenant): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all virtual meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -402,7 +402,7 @@ def worker(tenant): common_end_datetime_utc = max(energy_hourly.keys()) print("Getting common time slot of energy values for all offline meters") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: for meter_id, energy_hourly in energy_offline_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: diff --git a/myems-normalization/virtualmeter.py b/myems-normalization/virtualmeter.py index 4215f743..cbc2b088 100644 --- a/myems-normalization/virtualmeter.py +++ b/myems-normalization/virtualmeter.py @@ -348,7 +348,7 @@ def worker(virtual_meter): common_end_datetime_utc = max(energy_hourly.keys()) print("getting common time slot of energy values for all virtual meters...") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_virtual_meter_hourly is not None and len(energy_virtual_meter_hourly) > 0: for meter_id, energy_hourly in energy_virtual_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: @@ -362,7 +362,7 @@ def worker(virtual_meter): common_end_datetime_utc = max(energy_hourly.keys()) print("getting common time slot of energy values for all offline meters...") - if common_start_datetime_utc is not None and common_start_datetime_utc is not None: + if common_start_datetime_utc is not None and common_end_datetime_utc is not None: if energy_offline_meter_hourly is not None and len(energy_offline_meter_hourly) > 0: for meter_id, energy_hourly in energy_offline_meter_hourly.items(): if energy_hourly is None or len(energy_hourly) == 0: