Skip to content

Commit 8f7b075

Browse files
[pre-commit.ci lite] apply automatic fixes
1 parent f48cd12 commit 8f7b075

3 files changed

Lines changed: 13 additions & 12 deletions

File tree

‎apps/predbat/gecloud.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1392,7 +1392,6 @@ def download_ge_data(self, now_utc):
13921392
self.export_today_now = self.export_today.get(0, 0) - self.export_today.get(self.minutes_now, 0)
13931393
self.pv_today_now = self.pv_today.get(0, 0) - self.pv_today.get(self.minutes_now, 0)
13941394

1395-
13961395
self.log("GE GECloud load_last_period is {} kW".format(dp2(self.load_last_period)))
13971396
# More up to date sensors for current values if set
13981397
if "load_today" in self.args:

‎apps/predbat/utils.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def in_iboost_slot(minute, iboost_plan):
3232
break
3333
return load_amount
3434

35+
3536
def in_car_slot(minute, num_cars, car_charging_slots):
3637
"""
3738
Is the given minute inside a car slot
@@ -53,6 +54,7 @@ def in_car_slot(minute, num_cars, car_charging_slots):
5354
break
5455
return load_amount
5556

57+
5658
def time_string_to_stamp(time_string):
5759
"""
5860
Convert a time string to a timestamp

‎apps/predbat/web_helper.py‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2395,7 +2395,7 @@ def get_logfile_js(filter_type):
23952395
const searchTerm = document.getElementById('logSearchInput').value.toLowerCase();
23962396
const rows = document.querySelectorAll('#logTableBody tr[data-line]');
23972397
const statusDiv = document.getElementById('searchStatus');
2398-
2398+
23992399
let visibleCount = 0;
24002400
let totalCount = rows.length;
24012401
@@ -2414,14 +2414,14 @@ def get_logfile_js(filter_type):
24142414
// Filter and highlight entries
24152415
rows.forEach(row => {{
24162416
const rowText = row.textContent.toLowerCase();
2417-
2417+
24182418
if (rowText.includes(searchTerm)) {{
24192419
row.classList.remove('log-entry-hidden');
24202420
visibleCount++;
2421-
2421+
24222422
// Clear existing highlights first
24232423
clearHighlights(row);
2424-
2424+
24252425
// Apply new highlights
24262426
highlightTextInElement(row, searchTerm);
24272427
}} else {{
@@ -2464,35 +2464,35 @@ def get_logfile_js(filter_type):
24642464
const text = textNode.textContent;
24652465
const lowerText = text.toLowerCase();
24662466
const lowerSearchTerm = searchTerm.toLowerCase();
2467-
2467+
24682468
if (lowerText.includes(lowerSearchTerm)) {{
24692469
const parent = textNode.parentNode;
24702470
const fragment = document.createDocumentFragment();
2471-
2471+
24722472
let lastIndex = 0;
24732473
let index = lowerText.indexOf(lowerSearchTerm, 0);
2474-
2474+
24752475
while (index !== -1) {{
24762476
// Add text before the match
24772477
if (index > lastIndex) {{
24782478
fragment.appendChild(document.createTextNode(text.substring(lastIndex, index)));
24792479
}}
2480-
2480+
24812481
// Add highlighted match
24822482
const mark = document.createElement('mark');
24832483
mark.className = 'search-highlight';
24842484
mark.textContent = text.substring(index, index + searchTerm.length);
24852485
fragment.appendChild(mark);
2486-
2486+
24872487
lastIndex = index + searchTerm.length;
24882488
index = lowerText.indexOf(lowerSearchTerm, lastIndex);
24892489
}}
2490-
2490+
24912491
// Add remaining text
24922492
if (lastIndex < text.length) {{
24932493
fragment.appendChild(document.createTextNode(text.substring(lastIndex)));
24942494
}}
2495-
2495+
24962496
parent.replaceChild(fragment, textNode);
24972497
}}
24982498
}});

0 commit comments

Comments
 (0)