Skip to content

Commit

Permalink
set higher than 0 zero cost at startup until actual pricing is retreived
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaDodds committed Jul 3, 2023
1 parent aca9a07 commit b01cc15
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ def init():
publish_message("Cerbomoticzgx/system/shutdown", message="False", retain=True)

def post_startup():
# set higher than 0 zero cost at startup until actual pricing is retreived
STATE.set('tibber_price_now', '1')
# Reapply previously set Dynamic ESS preferences set in the previous run
DYNAMIC_ESS_BATT_MIN_SOC = retrieve_message('ess_net_metering_batt_min_soc') or dotenv_config('DYNAMIC_ESS_BATT_MIN_SOC')
DYNAMIC_ESS_NET_METERING_ENABLED = retrieve_message('ess_net_metering_enabled') or bool(dotenv_config('DYNAMIC_ESS_NET_METERING_ENABLED'))
Expand Down

0 comments on commit b01cc15

Please sign in to comment.