Skip to content

Commit

Permalink
2024.9.1: set delay_site to 60s minimum
Browse files Browse the repository at this point in the history
  • Loading branch information
Minims committed Sep 8, 2024
1 parent da2272c commit da9a0da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion myFox2Mqtt/config/config.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 3 additions & 2 deletions myFox2Mqtt/myfox_2_mqtt.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""MyFox 2 Mqtt"""

import logging
from time import sleep

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit da9a0da

Please sign in to comment.