Spaces:
Sleeping
Sleeping
Commit
·
71e14c9
1
Parent(s):
ee291d1
refined grid measurements
Browse files
app.py
CHANGED
@@ -90,7 +90,7 @@ def financial_analysis(
|
|
90 |
feed_in_revenue = surplus * FEED_IN_TARIFF / 100 # Convert to Ksh from cents/kWh
|
91 |
|
92 |
# Account for battery storage
|
93 |
-
grid_purchased = max(0, consumption - solar_used)
|
94 |
if storage > 0:
|
95 |
# Battery can offset some grid purchases
|
96 |
grid_offset = min(grid_purchased, storage)
|
|
|
90 |
feed_in_revenue = surplus * FEED_IN_TARIFF / 100 # Convert to Ksh from cents/kWh
|
91 |
|
92 |
# Account for battery storage
|
93 |
+
grid_purchased = max(0, consumption - common_area_consumption - solar_used)
|
94 |
if storage > 0:
|
95 |
# Battery can offset some grid purchases
|
96 |
grid_offset = min(grid_purchased, storage)
|