diff --git a/lib/energy_broker.py b/lib/energy_broker.py index f273332..4542e60 100644 --- a/lib/energy_broker.py +++ b/lib/energy_broker.py @@ -59,7 +59,7 @@ def publish_export_schedule(price_list: list) -> None: def get_todays_n_highest_prices(batt_soc: float, ess_net_metering_batt_min_soc: float = 0.0) -> list: - ess_net_metering_enabled = STATE.get('ess_net_metering_enabled') or None + ess_net_metering_enabled = STATE.get('ess_net_metering_enabled') or False if batt_soc > ess_net_metering_batt_min_soc and ess_net_metering_enabled: n = calculate_max_discharge_slots_needed(batt_soc - ess_net_metering_batt_min_soc) diff --git a/main.py b/main.py index ffcedd4..9d526ae 100644 --- a/main.py +++ b/main.py @@ -25,10 +25,9 @@ STATE = GlobalStateClient() ACTIVE_MODULES = json.loads(retrieve_setting('ACTIVE_MODULES')) -ESS_NET_METERING = bool(retrieve_setting('TIBBER_UPDATES_ENABLED')) or False +DYNAMIC_ESS_NET_METERING_ENABLED = bool(retrieve_setting('DYNAMIC_ESS_NET_METERING_ENABLED')) or False HOME_CONNECT_APPLIANCE_SCHEDULING = bool(retrieve_setting("HOME_CONNECT_APPLIANCE_SCHEDULING")) or False - def ev_charge_controller(): EvCharger().main() def energy_broker(): energybroker()