Skip to content

Commit b376fa7

Browse files
committed
Fix SonarCloud bugs and hotspots
1 parent ec6d296 commit b376fa7

File tree

10 files changed

+91
-86
lines changed

10 files changed

+91
-86
lines changed

.eslintrc.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2021": true
5+
},
6+
"parserOptions": {
7+
"ecmaVersion": 2021,
8+
"sourceType": "script"
9+
},
10+
"rules": {
11+
"eqeqeq": "off",
12+
"max-depth": "off",
13+
"max-lines-per-function": "off",
14+
"max-params": "off",
15+
"no-alert": "off",
16+
"no-undef": "off",
17+
"no-unused-vars": "off",
18+
"no-var": "off",
19+
"prefer-const": "off"
20+
}
21+
}

.github/workflows/hacs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ jobs:
1515
runs-on: "ubuntu-latest"
1616
steps:
1717
- name: HACS Action
18-
uses: "hacs/action@main"
18+
uses: "hacs/action@6f81caf1dd4cc0f615444dba4d4a3ceaa22db99c"
1919
with:
2020
category: "integration"

.github/workflows/hassfest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ jobs:
1414
runs-on: "ubuntu-latest"
1515
steps:
1616
- uses: "actions/checkout@v4"
17-
- uses: "home-assistant/actions/hassfest@master"
17+
- uses: "home-assistant/actions/hassfest@87c064c607f3c5cc673a24258d0c98d23033bfc3"

custom_components/oig_cloud/api/ote_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
_LOGGER = logging.getLogger(__name__)
1919

2020
# --- NAMESPACE & SOAP ---
21-
NAMESPACE = "http://www.ote-cr.cz/schema/service/public"
22-
SOAPENV = "http://schemas.xmlsoap.org/soap/envelope/"
21+
NAMESPACE = "http://www.ote-cr.cz/schema/service/public" # NOSONAR - XML namespace identifier
22+
SOAPENV = "http://schemas.xmlsoap.org/soap/envelope/" # NOSONAR - XML namespace identifier
2323

2424
# OTE endpoint podporuje HTTPS (viz WSDL soap:address) - preferujeme zabezpečenou variantu
2525
OTE_PUBLIC_URL = "https://www.ote-cr.cz/services/PublicDataService"

custom_components/oig_cloud/www/boiler-tab.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
<!-- Boiler Control Panel -->
55
<div class="boiler-control-panel minimized" id="boiler-control-panel">
6-
<div class="panel-header" onclick="toggleBoilerControlPanel()">
6+
<div class="panel-header" onclick="toggleBoilerControlPanel()" role="button" tabindex="0" onkeydown="if(event.key==='Enter'||event.key===' '){event.preventDefault(); this.click();}">
77
<h3>🛠️ Pokročilé ovládání (Debug)
8-
<span class="info-bubble" onclick="event.stopPropagation()">
8+
<span class="info-bubble" onclick="event.stopPropagation()" role="button" tabindex="0" onkeydown="if(event.key==='Enter'||event.key===' '){event.preventDefault(); this.click();}">
99
<span class="info-bubble-tooltip">
1010
<strong>⚠️ Automatický režim</strong>
1111
Bojler funguje plně automaticky! Systém:
@@ -57,7 +57,7 @@ <h4>Stav bojleru</h4>
5757
<div class="status-value entity-value" id="boiler-soc-value"
5858
data-entity="boiler_soc"
5959
data-tooltip="State of Charge - úroveň nabití (0-100%)"
60-
onclick="openEntityDialog(getSensorId('boiler_soc'))">
60+
onclick="openEntityDialog(getSensorId('boiler_soc'))" role="button" tabindex="0" onkeydown="if(event.key==='Enter'||event.key===' '){event.preventDefault(); this.click();}">
6161
-- %
6262
</div>
6363
</div>
@@ -66,7 +66,7 @@ <h4>Stav bojleru</h4>
6666
<div class="status-value entity-value" id="boiler-temp-top-value"
6767
data-entity="boiler_temperature_top"
6868
data-tooltip="Teplota v horní zóně bojleru"
69-
onclick="openEntityDialog(getSensorId('boiler_temperature_top'))">
69+
onclick="openEntityDialog(getSensorId('boiler_temperature_top'))" role="button" tabindex="0" onkeydown="if(event.key==='Enter'||event.key===' '){event.preventDefault(); this.click();}">
7070
-- °C
7171
</div>
7272
</div>
@@ -75,7 +75,7 @@ <h4>Stav bojleru</h4>
7575
<div class="status-value entity-value" id="boiler-energy-required-value"
7676
data-entity="boiler_energy_required"
7777
data-tooltip="Energie potřebná k dosažení cílové teploty"
78-
onclick="openEntityDialog(getSensorId('boiler_energy_required'))">
78+
onclick="openEntityDialog(getSensorId('boiler_energy_required'))" role="button" tabindex="0" onkeydown="if(event.key==='Enter'||event.key===' '){event.preventDefault(); this.click();}">
7979
-- kWh
8080
</div>
8181
</div>
@@ -84,7 +84,7 @@ <h4>Stav bojleru</h4>
8484
<div class="status-value entity-value" id="boiler-plan-cost-value"
8585
data-entity="boiler_plan_cost"
8686
data-tooltip="Celkové náklady na naplánovaný ohřev"
87-
onclick="openEntityDialog(getSensorId('boiler_plan_cost'))">
87+
onclick="openEntityDialog(getSensorId('boiler_plan_cost'))" role="button" tabindex="0" onkeydown="if(event.key==='Enter'||event.key===' '){event.preventDefault(); this.click();}">
8888
-- Kč
8989
</div>
9090
</div>

custom_components/oig_cloud/www/css/features/custom-tiles.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
position: relative;
5656
background: rgb(255, 255, 255, 0.03);
5757
backdrop-filter: blur(10px);
58-
backdrop-filter: blur(10px);
5958
border: 1px solid rgb(255, 255, 255, 0.08);
6059
border-radius: 8px;
6160
min-height: 45px;
@@ -91,7 +90,6 @@
9190
cursor: pointer;
9291
opacity: 0.6;
9392
backdrop-filter: blur(5px);
94-
backdrop-filter: blur(5px);
9593
}
9694

9795
.tile-placeholder:hover {
@@ -229,7 +227,6 @@
229227
color: var(--text-primary);
230228
background: rgb(0, 0, 0, 0.5);
231229
backdrop-filter: blur(8px);
232-
backdrop-filter: blur(8px);
233230
padding: 3px 5px;
234231
border-radius: 5px;
235232
border: 1px solid rgb(255, 255, 255, 0.1);
@@ -698,7 +695,6 @@
698695
border-radius: 8px;
699696
background: rgb(20, 20, 25, 0.95);
700697
backdrop-filter: blur(20px);
701-
backdrop-filter: blur(20px);
702698
max-height: 240px;
703699
overflow-y: auto;
704700
box-shadow: 0 8px 24px rgb(0, 0, 0, 0.4);

custom_components/oig_cloud/www/dashboard-styles-no-animations.css

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
font-weight: 700;
3838
background: var(--header-gradient);
3939
background-clip: text;
40-
background-clip: text;
4140
-webkit-text-fill-color: transparent;
4241
}
4342

@@ -3141,7 +3140,6 @@
31413140
position: relative;
31423141
background: rgb(255, 255, 255, 0.03);
31433142
backdrop-filter: blur(10px);
3144-
backdrop-filter: blur(10px);
31453143
border: 1px solid rgb(255, 255, 255, 0.08);
31463144
border-radius: 8px;
31473145
min-height: 45px;
@@ -3368,7 +3366,6 @@
33683366
border-radius: 8px;
33693367
background: rgb(20, 20, 25, 0.95);
33703368
backdrop-filter: blur(20px);
3371-
backdrop-filter: blur(20px);
33723369
max-height: 240px;
33733370
overflow-y: auto;
33743371
box-shadow: 0 8px 24px rgb(0, 0, 0, 0.4);

custom_components/oig_cloud/www/dashboard-styles-no-tiles.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
font-weight: 700;
4444
background: var(--header-gradient);
4545
background-clip: text;
46-
background-clip: text;
4746
-webkit-text-fill-color: transparent;
4847
}
4948

@@ -3482,7 +3481,6 @@
34823481
position: relative;
34833482
background: rgb(255, 255, 255, 0.03);
34843483
backdrop-filter: blur(10px);
3485-
backdrop-filter: blur(10px);
34863484
border: 1px solid rgb(255, 255, 255, 0.08);
34873485
border-radius: 8px;
34883486
min-height: 45px;
@@ -3709,7 +3707,6 @@
37093707
border-radius: 8px;
37103708
background: rgb(20, 20, 25, 0.95);
37113709
backdrop-filter: blur(20px);
3712-
backdrop-filter: blur(20px);
37133710
max-height: 240px;
37143711
overflow-y: auto;
37153712
box-shadow: 0 8px 24px rgb(0, 0, 0, 0.4);
@@ -7407,4 +7404,3 @@
74077404
color: var(--text-secondary);
74087405
font-size: 0.9rem;
74097406
}
7410-

custom_components/oig_cloud/www/dashboard-styles.css

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
font-weight: 700;
1414
background: var(--header-gradient);
1515
background-clip: text;
16-
background-clip: text;
1716
-webkit-text-fill-color: transparent;
1817
}
1918

@@ -3229,7 +3228,6 @@
32293228
position: relative;
32303229
background: rgb(255, 255, 255, 0.03);
32313230
backdrop-filter: blur(10px);
3232-
backdrop-filter: blur(10px);
32333231
border: 1px solid rgb(255, 255, 255, 0.08);
32343232
border-radius: 8px;
32353233
min-height: 45px;
@@ -3266,8 +3264,6 @@
32663264

32673265
/* Název při hover */
32683266

3269-
.dashboard-tile:hover
3270-
32713267
/* Podporné entity v rozích */
32723268

32733269
/* Button specific label */
@@ -3453,7 +3449,6 @@
34533449
border-radius: 8px;
34543450
background: rgb(20, 20, 25, 0.95);
34553451
backdrop-filter: blur(20px);
3456-
backdrop-filter: blur(20px);
34573452
max-height: 240px;
34583453
overflow-y: auto;
34593454
box-shadow: 0 8px 24px rgb(0, 0, 0, 0.4);

0 commit comments

Comments
 (0)