homebridge-multiple-switch 1.3.2 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/config.schema.json +1 -3
- package/homebridge-ui/public/i18n/ar.json +0 -2
- package/homebridge-ui/public/i18n/de.json +0 -2
- package/homebridge-ui/public/i18n/en.json +0 -2
- package/homebridge-ui/public/i18n/es.json +0 -2
- package/homebridge-ui/public/i18n/fr.json +0 -2
- package/homebridge-ui/public/i18n/it.json +0 -2
- package/homebridge-ui/public/i18n/ja.json +0 -2
- package/homebridge-ui/public/i18n/ko.json +0 -2
- package/homebridge-ui/public/i18n/nl.json +0 -2
- package/homebridge-ui/public/i18n/pl.json +0 -2
- package/homebridge-ui/public/i18n/pt.json +0 -2
- package/homebridge-ui/public/i18n/ru.json +0 -2
- package/homebridge-ui/public/i18n/tr.json +0 -2
- package/homebridge-ui/public/i18n/zh-CN.json +0 -2
- package/homebridge-ui/public/index.html +51 -20
- package/index.js +0 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.4.0] - 2026-03-21
|
|
4
|
+
|
|
5
|
+
### Removed
|
|
6
|
+
- Lightbulb and Fan switch types (HomeKit natively converts switches to these)
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
- Custom UI white background in dark mode — set `background: transparent !important`
|
|
10
|
+
on html/body so the iframe inherits the Homebridge theme
|
|
11
|
+
|
|
12
|
+
## [1.3.3] - 2026-03-21
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- Custom UI light/dark mode support: all labels, inputs, cards, and borders
|
|
16
|
+
now use Homebridge Bootstrap CSS variables (`--bs-body-color`, `--bs-body-bg`,
|
|
17
|
+
`--bs-border-color`, `--bs-tertiary-bg`) for proper theme adaptation
|
|
18
|
+
|
|
3
19
|
## [1.3.2] - 2026-03-21
|
|
4
20
|
|
|
5
21
|
### Changed
|
package/config.schema.json
CHANGED
|
@@ -42,9 +42,7 @@
|
|
|
42
42
|
"default": "outlet",
|
|
43
43
|
"oneOf": [
|
|
44
44
|
{ "title": "Switch", "enum": ["switch"] },
|
|
45
|
-
{ "title": "Outlet", "enum": ["outlet"] }
|
|
46
|
-
{ "title": "Lightbulb", "enum": ["lightbulb"] },
|
|
47
|
-
{ "title": "Fan", "enum": ["fan"] }
|
|
45
|
+
{ "title": "Outlet", "enum": ["outlet"] }
|
|
48
46
|
]
|
|
49
47
|
},
|
|
50
48
|
"defaultState": {
|
|
@@ -15,8 +15,6 @@
|
|
|
15
15
|
"switchTypeDesc": "نوع ملحق HomeKit لهذا المفتاح.",
|
|
16
16
|
"typeSwitch": "مفتاح",
|
|
17
17
|
"typeOutlet": "مقبس",
|
|
18
|
-
"typeLightbulb": "مصباح",
|
|
19
|
-
"typeFan": "مروحة",
|
|
20
18
|
"defaultState": "الحالة الافتراضية",
|
|
21
19
|
"defaultStateDesc": "حالة الطاقة الأولية عند بدء تشغيل Homebridge.",
|
|
22
20
|
"delayOff": "إيقاف تلقائي (مللي ثانية)",
|
|
@@ -15,8 +15,6 @@
|
|
|
15
15
|
"switchTypeDesc": "Der HomeKit-Zubehörtyp für diesen Schalter.",
|
|
16
16
|
"typeSwitch": "Schalter",
|
|
17
17
|
"typeOutlet": "Steckdose",
|
|
18
|
-
"typeLightbulb": "Glühbirne",
|
|
19
|
-
"typeFan": "Ventilator",
|
|
20
18
|
"defaultState": "Standardzustand",
|
|
21
19
|
"defaultStateDesc": "Anfänglicher Energiezustand beim Start von Homebridge.",
|
|
22
20
|
"delayOff": "Automatisch ausschalten (ms)",
|
|
@@ -15,8 +15,6 @@
|
|
|
15
15
|
"switchTypeDesc": "The HomeKit accessory type for this switch.",
|
|
16
16
|
"typeSwitch": "Switch",
|
|
17
17
|
"typeOutlet": "Outlet",
|
|
18
|
-
"typeLightbulb": "Lightbulb",
|
|
19
|
-
"typeFan": "Fan",
|
|
20
18
|
"defaultState": "Default State",
|
|
21
19
|
"defaultStateDesc": "Initial power state when Homebridge starts.",
|
|
22
20
|
"delayOff": "Auto Turn Off (ms)",
|
|
@@ -15,8 +15,6 @@
|
|
|
15
15
|
"switchTypeDesc": "El tipo de accesorio HomeKit para este interruptor.",
|
|
16
16
|
"typeSwitch": "Interruptor",
|
|
17
17
|
"typeOutlet": "Enchufe",
|
|
18
|
-
"typeLightbulb": "Bombilla",
|
|
19
|
-
"typeFan": "Ventilador",
|
|
20
18
|
"defaultState": "Estado predeterminado",
|
|
21
19
|
"defaultStateDesc": "Estado de energía inicial cuando Homebridge se inicia.",
|
|
22
20
|
"delayOff": "Apagado automático (ms)",
|
|
@@ -15,8 +15,6 @@
|
|
|
15
15
|
"switchTypeDesc": "Le type d'accessoire HomeKit pour cet interrupteur.",
|
|
16
16
|
"typeSwitch": "Interrupteur",
|
|
17
17
|
"typeOutlet": "Prise",
|
|
18
|
-
"typeLightbulb": "Ampoule",
|
|
19
|
-
"typeFan": "Ventilateur",
|
|
20
18
|
"defaultState": "État par défaut",
|
|
21
19
|
"defaultStateDesc": "État d'alimentation initial au démarrage de Homebridge.",
|
|
22
20
|
"delayOff": "Arrêt automatique (ms)",
|
|
@@ -15,8 +15,6 @@
|
|
|
15
15
|
"switchTypeDesc": "Il tipo di accessorio HomeKit per questo interruttore.",
|
|
16
16
|
"typeSwitch": "Interruttore",
|
|
17
17
|
"typeOutlet": "Presa",
|
|
18
|
-
"typeLightbulb": "Lampadina",
|
|
19
|
-
"typeFan": "Ventilatore",
|
|
20
18
|
"defaultState": "Stato predefinito",
|
|
21
19
|
"defaultStateDesc": "Stato di alimentazione iniziale all'avvio di Homebridge.",
|
|
22
20
|
"delayOff": "Spegnimento automatico (ms)",
|
|
@@ -15,8 +15,6 @@
|
|
|
15
15
|
"switchTypeDesc": "Het HomeKit-accessoiretype voor deze schakelaar.",
|
|
16
16
|
"typeSwitch": "Schakelaar",
|
|
17
17
|
"typeOutlet": "Stopcontact",
|
|
18
|
-
"typeLightbulb": "Gloeilamp",
|
|
19
|
-
"typeFan": "Ventilator",
|
|
20
18
|
"defaultState": "Standaardstatus",
|
|
21
19
|
"defaultStateDesc": "Initiële voedingsstatus wanneer Homebridge opstart.",
|
|
22
20
|
"delayOff": "Automatisch uitschakelen (ms)",
|
|
@@ -15,8 +15,6 @@
|
|
|
15
15
|
"switchTypeDesc": "Typ akcesorium HomeKit dla tego przełącznika.",
|
|
16
16
|
"typeSwitch": "Przełącznik",
|
|
17
17
|
"typeOutlet": "Gniazdko",
|
|
18
|
-
"typeLightbulb": "Żarówka",
|
|
19
|
-
"typeFan": "Wentylator",
|
|
20
18
|
"defaultState": "Stan domyślny",
|
|
21
19
|
"defaultStateDesc": "Początkowy stan zasilania przy uruchomieniu Homebridge.",
|
|
22
20
|
"delayOff": "Automatyczne wyłączenie (ms)",
|
|
@@ -15,8 +15,6 @@
|
|
|
15
15
|
"switchTypeDesc": "O tipo de acessório HomeKit para este interruptor.",
|
|
16
16
|
"typeSwitch": "Interruptor",
|
|
17
17
|
"typeOutlet": "Tomada",
|
|
18
|
-
"typeLightbulb": "Lâmpada",
|
|
19
|
-
"typeFan": "Ventilador",
|
|
20
18
|
"defaultState": "Estado padrão",
|
|
21
19
|
"defaultStateDesc": "Estado de energia inicial quando o Homebridge inicia.",
|
|
22
20
|
"delayOff": "Desligamento automático (ms)",
|
|
@@ -15,8 +15,6 @@
|
|
|
15
15
|
"switchTypeDesc": "Тип аксессуара HomeKit для этого переключателя.",
|
|
16
16
|
"typeSwitch": "Выключатель",
|
|
17
17
|
"typeOutlet": "Розетка",
|
|
18
|
-
"typeLightbulb": "Лампочка",
|
|
19
|
-
"typeFan": "Вентилятор",
|
|
20
18
|
"defaultState": "Состояние по умолчанию",
|
|
21
19
|
"defaultStateDesc": "Начальное состояние питания при запуске Homebridge.",
|
|
22
20
|
"delayOff": "Автоматическое выключение (мс)",
|
|
@@ -15,8 +15,6 @@
|
|
|
15
15
|
"switchTypeDesc": "Bu anahtar için HomeKit aksesuar tipi.",
|
|
16
16
|
"typeSwitch": "Anahtar",
|
|
17
17
|
"typeOutlet": "Priz",
|
|
18
|
-
"typeLightbulb": "Ampul",
|
|
19
|
-
"typeFan": "Vantilatör",
|
|
20
18
|
"defaultState": "Varsayılan Durum",
|
|
21
19
|
"defaultStateDesc": "Homebridge başladığında başlangıç güç durumu.",
|
|
22
20
|
"delayOff": "Otomatik Kapanma (ms)",
|
|
@@ -1,33 +1,66 @@
|
|
|
1
1
|
<style>
|
|
2
2
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
3
|
-
body {
|
|
3
|
+
html, body {
|
|
4
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
5
|
+
color: var(--bs-body-color, inherit);
|
|
6
|
+
background: transparent !important;
|
|
7
|
+
}
|
|
4
8
|
.form-group { margin-bottom: 16px; }
|
|
5
|
-
label {
|
|
6
|
-
|
|
9
|
+
label {
|
|
10
|
+
display: block; font-weight: 600; margin-bottom: 4px; font-size: 14px;
|
|
11
|
+
color: var(--bs-body-color, inherit);
|
|
12
|
+
}
|
|
13
|
+
.desc {
|
|
14
|
+
color: var(--bs-secondary-color, #888);
|
|
15
|
+
font-size: 12px; margin-bottom: 6px;
|
|
16
|
+
}
|
|
7
17
|
input[type="text"], input[type="number"], select {
|
|
8
|
-
width: 100%; padding: 8px 10px;
|
|
9
|
-
|
|
18
|
+
width: 100%; padding: 8px 10px;
|
|
19
|
+
border: 1px solid var(--bs-border-color, #444);
|
|
20
|
+
border-radius: 6px; font-size: 14px;
|
|
21
|
+
background: var(--bs-body-bg, transparent);
|
|
22
|
+
color: var(--bs-body-color, inherit);
|
|
23
|
+
transition: border-color 0.2s;
|
|
24
|
+
}
|
|
25
|
+
input:focus, select:focus {
|
|
26
|
+
border-color: var(--bs-primary, #007bff);
|
|
27
|
+
outline: none;
|
|
10
28
|
}
|
|
11
|
-
input:focus, select:focus { border-color: #007bff; outline: none; }
|
|
12
29
|
.switch-card {
|
|
13
|
-
border: 1px solid
|
|
14
|
-
|
|
30
|
+
border: 1px solid var(--bs-border-color, #444);
|
|
31
|
+
border-radius: 8px; padding: 16px; margin-bottom: 12px;
|
|
32
|
+
background: var(--bs-tertiary-bg, rgba(128,128,128,0.08));
|
|
33
|
+
position: relative;
|
|
34
|
+
}
|
|
35
|
+
.switch-card .switch-header {
|
|
36
|
+
display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
|
|
37
|
+
}
|
|
38
|
+
.switch-card .switch-header strong {
|
|
39
|
+
font-size: 14px;
|
|
40
|
+
color: var(--bs-body-color, inherit);
|
|
41
|
+
}
|
|
42
|
+
.btn {
|
|
43
|
+
padding: 8px 16px; border: none; border-radius: 6px;
|
|
44
|
+
cursor: pointer; font-size: 13px; font-weight: 600;
|
|
15
45
|
}
|
|
16
|
-
.switch-card .switch-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
|
|
17
|
-
.switch-card .switch-header strong { font-size: 14px; }
|
|
18
|
-
.btn { padding: 8px 16px; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 600; }
|
|
19
46
|
.btn-danger { background: #dc3545; color: #fff; }
|
|
20
47
|
.btn-danger:hover { background: #c82333; }
|
|
21
|
-
.btn-primary { background: #007bff; color: #fff; }
|
|
22
|
-
.btn-primary:hover {
|
|
23
|
-
.btn-success { background: #28a745; color: #fff; }
|
|
24
|
-
.btn-success:hover { background: #218838; }
|
|
48
|
+
.btn-primary { background: var(--bs-primary, #007bff); color: #fff; }
|
|
49
|
+
.btn-primary:hover { opacity: 0.85; }
|
|
25
50
|
.actions { margin-top: 16px; display: flex; gap: 10px; }
|
|
26
|
-
h4 { margin-bottom: 8px; }
|
|
27
51
|
.toggle-wrap { display: flex; align-items: center; gap: 8px; }
|
|
28
|
-
.toggle-wrap input[type="checkbox"] { width: 18px; height: 18px; }
|
|
29
|
-
.
|
|
52
|
+
.toggle-wrap input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--bs-primary, #007bff); }
|
|
53
|
+
.toggle-wrap span { color: var(--bs-body-color, inherit); }
|
|
54
|
+
.section-title {
|
|
55
|
+
font-size: 15px; font-weight: 700; margin-bottom: 10px;
|
|
56
|
+
padding-bottom: 6px; border-bottom: 1px solid var(--bs-border-color, #444);
|
|
57
|
+
color: var(--bs-body-color, inherit);
|
|
58
|
+
}
|
|
30
59
|
.inline-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
|
|
60
|
+
select option {
|
|
61
|
+
background: var(--bs-body-bg, #fff);
|
|
62
|
+
color: var(--bs-body-color, #000);
|
|
63
|
+
}
|
|
31
64
|
</style>
|
|
32
65
|
|
|
33
66
|
<div id="app"></div>
|
|
@@ -150,8 +183,6 @@
|
|
|
150
183
|
<select class="sw-field" data-idx="${i}" data-field="type">
|
|
151
184
|
<option value="switch" ${sw.type === 'switch' ? 'selected' : ''}>${t.typeSwitch || 'Switch'}</option>
|
|
152
185
|
<option value="outlet" ${sw.type === 'outlet' || !sw.type ? 'selected' : ''}>${t.typeOutlet || 'Outlet'}</option>
|
|
153
|
-
<option value="lightbulb" ${sw.type === 'lightbulb' ? 'selected' : ''}>${t.typeLightbulb || 'Lightbulb'}</option>
|
|
154
|
-
<option value="fan" ${sw.type === 'fan' ? 'selected' : ''}>${t.typeFan || 'Fan'}</option>
|
|
155
186
|
</select>
|
|
156
187
|
</div>
|
|
157
188
|
</div>
|
package/index.js
CHANGED
package/package.json
CHANGED