From 68845b5175a47f80a591de9324a423efeb8903e0 Mon Sep 17 00:00:00 2001 From: balgerion <133121849+balgerion@users.noreply.github.com> Date: Mon, 9 Jun 2025 13:57:07 +0200 Subject: [PATCH] Update const.py --- custom_components/pstryk/const.py | 11 +++++++++++ 1 file changed, 11 insertions(+) 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)