From da9a0da51a18af86f09e744d40d2c5cfbb93ec15 Mon Sep 17 00:00:00 2001 From: Minims Date: Sun, 8 Sep 2024 14:44:07 +0200 Subject: [PATCH] 2024.9.1: set delay_site to 60s minimum --- myFox2Mqtt/config/config.yaml.example | 2 +- myFox2Mqtt/myfox_2_mqtt.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/myFox2Mqtt/config/config.yaml.example b/myFox2Mqtt/config/config.yaml.example index 3c815cb..e34e6b6 100644 --- a/myFox2Mqtt/config/config.yaml.example +++ b/myFox2Mqtt/config/config.yaml.example @@ -29,6 +29,6 @@ mqtt: ha_discover_prefix: "homeassistant" # MyFox2MQTT -delay_site: 10 # seconds +delay_site: 60 # seconds delay_device: 60 # seconds manual_snapshot: false diff --git a/myFox2Mqtt/myfox_2_mqtt.py b/myFox2Mqtt/myfox_2_mqtt.py index 8926d8b..59d8538 100644 --- a/myFox2Mqtt/myfox_2_mqtt.py +++ b/myFox2Mqtt/myfox_2_mqtt.py @@ -1,4 +1,5 @@ """MyFox 2 Mqtt""" + import logging from time import sleep @@ -41,10 +42,10 @@ def __init__(self, api: MyFoxApi, mqtt_client: MQTTClient, config: dict) -> None self.my_sites_id = [] self.delay_site = config.get("delay_site", 60) - self.delay_site = max(self.delay_site, 10) + self.delay_site = max(self.delay_site, 60) self.delay_device = config.get("delay_device", 60) - self.delay_device = max(self.delay_device, 10) + self.delay_device = max(self.delay_device, 60) self.manual_snapshot = config.get("manual_snapshot", False)