diff --git a/lib/constants.py b/lib/constants.py index 6a2fa35..c3a363c 100644 --- a/lib/constants.py +++ b/lib/constants.py @@ -50,9 +50,9 @@ "grid_charging_enabled": f"Tesla/settings/grid_charging_enabled", "trigger_ess_charge_scheduling": f"Cerbomoticzgx/EnergyBroker/RunTrigger", "system_shutdown": f"Cerbomoticzgx/system/shutdown", - "ess_net_metering_enabled": f"Cerbomoticzgx/system/EssNetMeteringEnabled", - "ess_net_metering_overridden": f"Cerbomoticzgx/system/EssNetMeteringOverridden", # When this is toggled on, DynESS will not operate with automated buy/sell decisions - "ess_net_metering_batt_min_soc": f"Cerbomoticzgx/system/EssNetMeteringBattMinSoc", + "ess_net_metering_enabled": f"Cerbomoticzgx/system/ess_net_metering_enabled", + "ess_net_metering_overridden": f"Cerbomoticzgx/system/ess_net_metering_overridden", # When this is toggled on, DynESS will not operate with automated buy/sell decisions + "ess_net_metering_batt_min_soc": f"Cerbomoticzgx/system/ess_net_metering_batt_min_soc", # Tibber "tibber_total": f"N/{systemId0}/Tibber/home/energy/day/euro_day_total", # workaround to update dz diff --git a/main.py b/main.py index ef0b906..64691f6 100644 --- a/main.py +++ b/main.py @@ -85,11 +85,11 @@ def post_startup(): logging.info(f"post_startup(): Re-storing previous state if available...") restore_and_publish('ac_power_setpoint', default='0.0') - restore_and_publish('ess_net_metering_batt_min_soc') - restore_and_publish('ess_net_metering_enabled') + restore_and_publish('ess_net_metering_batt_min_soc', default='80.0') + restore_and_publish('ess_net_metering_enabled', default=False) + restore_and_publish('ess_net_metering_overridden', default=False) restore_and_publish('grid_charging_enabled', default=False) restore_and_publish('grid_charging_enabled_by_price', default=False) - restore_and_publish('ess_net_metering_overridden', default=False) restore_and_publish('tesla_charge_requested', default=False) # clear the energy sale scheduling status message