Skip to content

Commit

Permalink
refresh every +- 120min to limit simultaneous slow reloads
Browse files Browse the repository at this point in the history
  • Loading branch information
myTselection committed Dec 29, 2023
1 parent 46f8817 commit f65bc30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion custom_components/mijntuin/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/myTselection/MijnTuin/issues",
"requirements": ["bs4", "html5lib"],
"version": "1.6.3"
"version": "1.6.4"
}
3 changes: 2 additions & 1 deletion custom_components/mijntuin/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import asyncio
from datetime import date, datetime, timedelta
import calendar
import random

import homeassistant.helpers.config_validation as cv
import voluptuous as vol
Expand All @@ -24,7 +25,7 @@
}
)

MIN_TIME_BETWEEN_UPDATES = timedelta(hours=1)
MIN_TIME_BETWEEN_UPDATES = timedelta(minutes=120 + random.uniform(10, 20))


async def dry_setup(hass, config_entry, async_add_devices):
Expand Down

0 comments on commit f65bc30

Please sign in to comment.