Skip to content

Commit

Permalink
reload +- every 120min to limit slow reloads
Browse files Browse the repository at this point in the history
  • Loading branch information
myTselection committed Dec 29, 2023
1 parent 73d5046 commit 0439b37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion custom_components/carbu_com/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/carbu_com/issues",
"requirements": ["bs4","requests","ratelimit"],
"version": "9.0.1"
"version": "9.0.3"
}
3 changes: 2 additions & 1 deletion custom_components/carbu_com/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from datetime import date, datetime, timedelta
import calendar
from .utils import *
import random

import homeassistant.helpers.config_validation as cv
import voluptuous as vol
Expand Down Expand Up @@ -41,7 +42,7 @@
}
)

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


Expand Down

0 comments on commit 0439b37

Please sign in to comment.