diff --git a/custom_components/pstryk/const.py b/custom_components/pstryk/const.py index 375fddf..3e456dd 100644 --- a/custom_components/pstryk/const.py +++ b/custom_components/pstryk/const.py @@ -17,3 +17,14 @@ DEFAULT_MQTT_TOPIC_SELL = "energy/forecast/sell" CONF_MQTT_ENABLED = "mqtt_enabled" CONF_MQTT_TOPIC_BUY = "mqtt_topic_buy" CONF_MQTT_TOPIC_SELL = "mqtt_topic_sell" +CONF_MQTT_48H_MODE = "mqtt_48h_mode" + +# Retry mechanism constants +CONF_RETRY_ATTEMPTS = "retry_attempts" +CONF_RETRY_DELAY = "retry_delay" +DEFAULT_RETRY_ATTEMPTS = 3 +DEFAULT_RETRY_DELAY = 20 # seconds +MIN_RETRY_ATTEMPTS = 1 +MAX_RETRY_ATTEMPTS = 10 +MIN_RETRY_DELAY = 5 # seconds +MAX_RETRY_DELAY = 300 # seconds (5 minutes)