homebridge-virtual-accessories 3.16.2 → 3.16.4
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/config.schema.json +6 -8
- package/package.json +3 -1
- package/schemas/config.schema.es.json +119 -32
- package/schemas/config.schema.nl.json +127 -40
- package/schemas/translations/es.json +227 -0
- package/schemas/translations/nl.json +227 -0
- package/schemas/translations/template.json +227 -0
- package/scripts/generate-schemas.js +113 -0
- package/scripts/generate-template.js +59 -0
package/config.schema.json
CHANGED
|
@@ -74,11 +74,11 @@
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
|
+
"required": [ "name" ],
|
|
77
78
|
"properties": {
|
|
78
79
|
"name": {
|
|
79
80
|
"title": "Platform Name",
|
|
80
81
|
"type": "string",
|
|
81
|
-
"required": true,
|
|
82
82
|
"default": "Virtual Accessories Platform",
|
|
83
83
|
"readonly": true
|
|
84
84
|
},
|
|
@@ -111,25 +111,23 @@
|
|
|
111
111
|
"type": "object",
|
|
112
112
|
"expandable": true,
|
|
113
113
|
"expanded": false,
|
|
114
|
+
"required": [ "accessoryID", "accessoryName", "accessoryType" ],
|
|
114
115
|
"properties": {
|
|
115
116
|
"accessoryID": {
|
|
116
117
|
"title": "Accessory ID",
|
|
117
118
|
"description": "Unique ID for the Accessory (https://www.random.org/). Do not modify once assigned!",
|
|
118
119
|
"type": "string",
|
|
119
|
-
"required": true,
|
|
120
120
|
"pattern": "^[A-Za-z0-9\\-]{5,}$"
|
|
121
121
|
},
|
|
122
122
|
"accessoryName": {
|
|
123
123
|
"title": "Accessory Name",
|
|
124
124
|
"description": "Accessory name as it will be displayed in HomeKit",
|
|
125
125
|
"type": "string",
|
|
126
|
-
"required": true,
|
|
127
126
|
"pattern": "^(?=[\\p{L}\\p{N}])[\\p{L}\\p{N}\\s']*(?<=[\\p{L}\\p{N}])$"
|
|
128
127
|
},
|
|
129
128
|
"accessoryType": {
|
|
130
129
|
"title": "Accessory Type",
|
|
131
130
|
"type": "string",
|
|
132
|
-
"required": true,
|
|
133
131
|
"oneOf": [
|
|
134
132
|
{ "title": "Air Purifier", "enum": ["airpurifier"] },
|
|
135
133
|
{ "title": "Battery", "enum": ["battery"] },
|
|
@@ -187,7 +185,7 @@
|
|
|
187
185
|
"type": "boolean"
|
|
188
186
|
},
|
|
189
187
|
"lowLevelThreshold": {
|
|
190
|
-
"title": "Battery
|
|
188
|
+
"title": "Battery Low Threshold (5% - 25%) *",
|
|
191
189
|
"type": "integer",
|
|
192
190
|
"minimum": 5,
|
|
193
191
|
"maximum": 25
|
|
@@ -783,7 +781,7 @@
|
|
|
783
781
|
"description": "Switch triggers a sensor when its state changes",
|
|
784
782
|
"type": "boolean"
|
|
785
783
|
},
|
|
786
|
-
"muteLogging"
|
|
784
|
+
"muteLogging": {
|
|
787
785
|
"title": "Mute Logging",
|
|
788
786
|
"description": "Log information will only be visible when running in debug mode",
|
|
789
787
|
"type": "boolean"
|
|
@@ -1258,7 +1256,7 @@
|
|
|
1258
1256
|
"title": "Start Date-Time",
|
|
1259
1257
|
"type": "string",
|
|
1260
1258
|
"format": "iso-date-time",
|
|
1261
|
-
"widget":"datetime-local",
|
|
1259
|
+
"widget": "datetime-local",
|
|
1262
1260
|
"x-inputAttributes": {
|
|
1263
1261
|
"step": 1
|
|
1264
1262
|
}
|
|
@@ -1267,7 +1265,7 @@
|
|
|
1267
1265
|
"title": "End Date-Time ",
|
|
1268
1266
|
"type": "string",
|
|
1269
1267
|
"format": "iso-date-time",
|
|
1270
|
-
"widget":"datetime-local",
|
|
1268
|
+
"widget": "datetime-local",
|
|
1271
1269
|
"x-inputAttributes": {
|
|
1272
1270
|
"step": 1
|
|
1273
1271
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "homebridge-virtual-accessories",
|
|
3
3
|
"displayName": "Virtual Accessories for Homebridge",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "3.16.
|
|
5
|
+
"version": "3.16.4",
|
|
6
6
|
"description": "Virtual HomeKit accessories for Homebridge.",
|
|
7
7
|
"author": "justjam2023 (Renzo Zanelli - renzo.zanelli6@gmail.com)",
|
|
8
8
|
"license": "MIT",
|
|
@@ -103,6 +103,8 @@
|
|
|
103
103
|
},
|
|
104
104
|
"scripts": {
|
|
105
105
|
"build": "rimraf ./dist && tsc",
|
|
106
|
+
"generate-schemas": "node scripts/generate-schemas.js",
|
|
107
|
+
"generate-template": "node scripts/generate-template.js",
|
|
106
108
|
"lint": "eslint . --max-warnings=0",
|
|
107
109
|
"prepublishOnly": "npm run lint && npm run build",
|
|
108
110
|
"watch": "npm run build && npm link && nodemon"
|
|
@@ -74,11 +74,11 @@
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
|
+
"required": [ "name" ],
|
|
77
78
|
"properties": {
|
|
78
79
|
"name": {
|
|
79
80
|
"title": "Nombre de la Plataforma",
|
|
80
81
|
"type": "string",
|
|
81
|
-
"required": true,
|
|
82
82
|
"default": "Virtual Accessories Platform",
|
|
83
83
|
"readonly": true
|
|
84
84
|
},
|
|
@@ -111,32 +111,30 @@
|
|
|
111
111
|
"type": "object",
|
|
112
112
|
"expandable": true,
|
|
113
113
|
"expanded": false,
|
|
114
|
+
"required": [ "accessoryID", "accessoryName", "accessoryType" ],
|
|
114
115
|
"properties": {
|
|
115
116
|
"accessoryID": {
|
|
116
117
|
"title": "ID del Accesorio",
|
|
117
118
|
"description": "ID único del accesorio (https://www.random.org/). ¡No lo modifique una vez asignado!",
|
|
118
119
|
"type": "string",
|
|
119
|
-
"required": true,
|
|
120
120
|
"pattern": "^[A-Za-z0-9\\-]{5,}$"
|
|
121
121
|
},
|
|
122
122
|
"accessoryName": {
|
|
123
123
|
"title": "Nombre del Accesorio",
|
|
124
124
|
"description": "Nombre del accesorio tal como se mostrará en HomeKit",
|
|
125
125
|
"type": "string",
|
|
126
|
-
"required": true,
|
|
127
126
|
"pattern": "^(?=[\\p{L}\\p{N}])[\\p{L}\\p{N}\\s']*(?<=[\\p{L}\\p{N}])$"
|
|
128
127
|
},
|
|
129
128
|
"accessoryType": {
|
|
130
129
|
"title": "Tipo de Accesorio",
|
|
131
130
|
"type": "string",
|
|
132
|
-
"required": true,
|
|
133
131
|
"oneOf": [
|
|
134
132
|
{ "title": "Purificador de Aire", "enum": ["airpurifier"] },
|
|
135
133
|
{ "title": "Batería", "enum": ["battery"] },
|
|
136
134
|
{ "title": "Puerta", "enum": ["door"] },
|
|
137
135
|
{ "title": "Timbre", "enum": ["doorbell"] },
|
|
138
136
|
{ "title": "Ventilador", "enum": ["fan"] },
|
|
139
|
-
{ "title": "Mantenimiento
|
|
137
|
+
{ "title": "Mantenimiento de Filtro", "enum": ["filtermaintenance"] },
|
|
140
138
|
{ "title": "Puerta de Garaje", "enum": ["garagedoor"] },
|
|
141
139
|
{ "title": "Calefactor/Aire Acondicionado", "enum": ["heatercooler"] },
|
|
142
140
|
{ "title": "Humidificador/Deshumidificador", "enum": ["humidifierdehumidifier"] },
|
|
@@ -149,6 +147,7 @@
|
|
|
149
147
|
{ "title": "Altavoz", "enum": ["speaker"] },
|
|
150
148
|
{ "title": "Interruptor", "enum": ["switch"] },
|
|
151
149
|
{ "title": "Televisor", "enum": ["television"] },
|
|
150
|
+
{ "title": "Termostato", "enum": ["thermostat"] },
|
|
152
151
|
{ "title": "Válvula", "enum": ["valve"] },
|
|
153
152
|
{ "title": "Ventana", "enum": ["window"] },
|
|
154
153
|
{ "title": "Cubierta de Ventana (Persianas, Cortinas)", "enum": ["windowcovering"] }
|
|
@@ -159,7 +158,7 @@
|
|
|
159
158
|
"description": "El estado del accesorio se mantiene tras reiniciar Homebridge",
|
|
160
159
|
"type": "boolean",
|
|
161
160
|
"condition": {
|
|
162
|
-
"functionBody": "return ['airpurifier', 'door', 'fan', 'garagedoor', 'humidifierdehumidifier', 'lightbulb', 'lock', 'securitysystem', 'speaker', 'switch', 'television', 'valve', 'window', 'windowcovering'].includes(model.devices[arrayIndices].accessoryType);"
|
|
161
|
+
"functionBody": "return ['airpurifier', 'door', 'fan', 'garagedoor', 'heatercooler', 'humidifierdehumidifier', 'lightbulb', 'lock', 'securitysystem', 'speaker', 'switch', 'television', 'thermostat', 'valve', 'window', 'windowcovering'].includes(model.devices[arrayIndices].accessoryType);"
|
|
163
162
|
}
|
|
164
163
|
},
|
|
165
164
|
"airPurifier": {
|
|
@@ -318,7 +317,7 @@
|
|
|
318
317
|
}
|
|
319
318
|
},
|
|
320
319
|
"temperatureDisplayUnits": {
|
|
321
|
-
"title": "Unidades de Temperatura *",
|
|
320
|
+
"title": "Unidades de Visualización de Temperatura *",
|
|
322
321
|
"type": "string",
|
|
323
322
|
"oneOf": [
|
|
324
323
|
{ "title": "Celsius (ºC)", "enum": ["celsius"] },
|
|
@@ -486,6 +485,13 @@
|
|
|
486
485
|
{ "title": "Humidificador y Deshumidificador", "enum": ["auto"] }
|
|
487
486
|
]
|
|
488
487
|
},
|
|
488
|
+
"hasFan": {
|
|
489
|
+
"title": "Tiene ventilador",
|
|
490
|
+
"type": "boolean",
|
|
491
|
+
"condition": {
|
|
492
|
+
"functionBody": "return model.devices[arrayIndices].humidifierDehumidifier && ['humidifier', 'dehumidifier', 'auto'].includes(model.devices[arrayIndices].humidifierDehumidifier.type);"
|
|
493
|
+
}
|
|
494
|
+
},
|
|
489
495
|
"humidifierThreshold": {
|
|
490
496
|
"title": "Umbral de Humidificación *",
|
|
491
497
|
"description": "Nivel de humedad por debajo del cual se enciende el humidificador (0% - 100%)",
|
|
@@ -807,6 +813,87 @@
|
|
|
807
813
|
"functionBody": "return model.devices[arrayIndices].accessoryType === 'television';"
|
|
808
814
|
}
|
|
809
815
|
},
|
|
816
|
+
"thermostat": {
|
|
817
|
+
"title": "Termostato",
|
|
818
|
+
"type": "object",
|
|
819
|
+
"properties": {
|
|
820
|
+
"temperatureDisplayUnits": {
|
|
821
|
+
"title": "Unidades de Visualización de Temperatura *",
|
|
822
|
+
"type": "string",
|
|
823
|
+
"oneOf": [
|
|
824
|
+
{ "title": "Celsius (ºC)", "enum": ["celsius"] },
|
|
825
|
+
{ "title": "Fahrenheit (ºF)", "enum": ["fahrenheit"] }
|
|
826
|
+
]
|
|
827
|
+
},
|
|
828
|
+
"heatingThresholdCelsius": {
|
|
829
|
+
"title": "Umbral de Calefacción ºC *",
|
|
830
|
+
"description": "Nivel de temperatura por debajo del cual se activa el termostato (0ºC - 25ºC)",
|
|
831
|
+
"type": "integer",
|
|
832
|
+
"minimum": 0,
|
|
833
|
+
"maximum": 25,
|
|
834
|
+
"condition": {
|
|
835
|
+
"functionBody": "return model.devices[arrayIndices].thermostat && model.devices[arrayIndices].thermostat.temperatureDisplayUnits === 'celsius';"
|
|
836
|
+
}
|
|
837
|
+
},
|
|
838
|
+
"coolingThresholdCelsius": {
|
|
839
|
+
"title": "Umbral de Refrigeración ºC *",
|
|
840
|
+
"description": "Nivel de temperatura por encima del cual se activa el termostato (10ºC - 35ºC)",
|
|
841
|
+
"type": "integer",
|
|
842
|
+
"minimum": 10,
|
|
843
|
+
"maximum": 35,
|
|
844
|
+
"condition": {
|
|
845
|
+
"functionBody": "return model.devices[arrayIndices].thermostat && model.devices[arrayIndices].thermostat.temperatureDisplayUnits === 'celsius';"
|
|
846
|
+
}
|
|
847
|
+
},
|
|
848
|
+
"heatingThresholdFahrenheit": {
|
|
849
|
+
"title": "Umbral de Calefacción ºF *",
|
|
850
|
+
"description": "Nivel de temperatura por debajo del cual se activa el termostato (32ºF - 77ºF)",
|
|
851
|
+
"type": "integer",
|
|
852
|
+
"minimum": 32,
|
|
853
|
+
"maximum": 77,
|
|
854
|
+
"condition": {
|
|
855
|
+
"functionBody": "return model.devices[arrayIndices].thermostat && model.devices[arrayIndices].thermostat.temperatureDisplayUnits === 'fahrenheit';"
|
|
856
|
+
}
|
|
857
|
+
},
|
|
858
|
+
"coolingThresholdFahrenheit": {
|
|
859
|
+
"title": "Umbral de Refrigeración ºF *",
|
|
860
|
+
"description": "Nivel de temperatura por encima del cual se activa el termostato (50ºF - 95ºF)",
|
|
861
|
+
"type": "integer",
|
|
862
|
+
"minimum": 50,
|
|
863
|
+
"maximum": 95,
|
|
864
|
+
"condition": {
|
|
865
|
+
"functionBody": "return model.devices[arrayIndices].thermostat && model.devices[arrayIndices].thermostat.temperatureDisplayUnits === 'fahrenheit';"
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
},
|
|
869
|
+
"condition": {
|
|
870
|
+
"functionBody": "return model.devices[arrayIndices].accessoryType === 'thermostat';"
|
|
871
|
+
},
|
|
872
|
+
"allOf": [
|
|
873
|
+
{
|
|
874
|
+
"if": {
|
|
875
|
+
"properties": {
|
|
876
|
+
"temperatureDisplayUnits": { "const": "celsius" }
|
|
877
|
+
},
|
|
878
|
+
"required": [ "temperatureDisplayUnits" ]
|
|
879
|
+
},
|
|
880
|
+
"then": {
|
|
881
|
+
"required": [ "heatingThresholdCelsius", "coolingThresholdCelsius" ]
|
|
882
|
+
}
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
"if": {
|
|
886
|
+
"properties": {
|
|
887
|
+
"temperatureDisplayUnits": { "const": "fahrenheit" }
|
|
888
|
+
},
|
|
889
|
+
"required": [ "temperatureDisplayUnits" ]
|
|
890
|
+
},
|
|
891
|
+
"then": {
|
|
892
|
+
"required": [ "heatingThresholdFahrenheit", "coolingThresholdFahrenheit" ]
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
]
|
|
896
|
+
},
|
|
810
897
|
"valve": {
|
|
811
898
|
"title": "Válvula",
|
|
812
899
|
"type": "object",
|
|
@@ -913,20 +1000,18 @@
|
|
|
913
1000
|
"properties": {
|
|
914
1001
|
"type": {
|
|
915
1002
|
"title": "Tipo *",
|
|
916
|
-
"description": "Tipo de sensor
|
|
1003
|
+
"description": "Tipo de sensor de medición",
|
|
917
1004
|
"type": "string",
|
|
918
1005
|
"oneOf": [
|
|
919
1006
|
{ "title": "Humedad", "enum": ["humidity"] },
|
|
920
1007
|
{ "title": "Temperatura", "enum": ["temperature"] }
|
|
921
1008
|
]
|
|
922
1009
|
},
|
|
923
|
-
"
|
|
924
|
-
"title": "
|
|
925
|
-
"
|
|
926
|
-
"
|
|
927
|
-
|
|
928
|
-
{ "title": "Fahrenheit (ºF)", "enum": ["fahrenheit"] }
|
|
929
|
-
],
|
|
1010
|
+
"": {
|
|
1011
|
+
"title": " ",
|
|
1012
|
+
"description": "Nota: Las unidades de temperatura se configuran en la interfaz de Homebridge, en Ajustes > Visualización (predeterminado: Celsius).",
|
|
1013
|
+
"type": "object",
|
|
1014
|
+
"properties": {},
|
|
930
1015
|
"condition": {
|
|
931
1016
|
"functionBody": "return model.devices[arrayIndices].measurement && model.devices[arrayIndices].measurement.type === 'temperature';"
|
|
932
1017
|
}
|
|
@@ -934,20 +1019,7 @@
|
|
|
934
1019
|
},
|
|
935
1020
|
"condition": {
|
|
936
1021
|
"functionBody": "return model.devices[arrayIndices].accessoryType === 'measurement';"
|
|
937
|
-
}
|
|
938
|
-
"allOf": [
|
|
939
|
-
{
|
|
940
|
-
"if": {
|
|
941
|
-
"properties": {
|
|
942
|
-
"type": { "const": "temperature" }
|
|
943
|
-
},
|
|
944
|
-
"required": [ "type" ]
|
|
945
|
-
},
|
|
946
|
-
"then": {
|
|
947
|
-
"required": [ "temperatureUnits" ]
|
|
948
|
-
}
|
|
949
|
-
}
|
|
950
|
-
]
|
|
1022
|
+
}
|
|
951
1023
|
},
|
|
952
1024
|
"resetTimer": {
|
|
953
1025
|
"title": "Temporizador de Reinicio",
|
|
@@ -1116,7 +1188,7 @@
|
|
|
1116
1188
|
"type": "string",
|
|
1117
1189
|
"oneOf": [
|
|
1118
1190
|
{ "title": "Contacto", "enum": ["contact"] },
|
|
1119
|
-
{ "title": "Fuga (
|
|
1191
|
+
{ "title": "Fuga (crítico)", "enum": ["leak"] },
|
|
1120
1192
|
{ "title": "Movimiento", "enum": ["motion"] },
|
|
1121
1193
|
{ "title": "Ocupación", "enum": ["occupancy"] },
|
|
1122
1194
|
{ "title": "Dióxido de Carbono (crítico)", "enum": ["carbonDioxide"] },
|
|
@@ -1277,7 +1349,7 @@
|
|
|
1277
1349
|
}
|
|
1278
1350
|
},
|
|
1279
1351
|
"startupTrigger": {
|
|
1280
|
-
"title": "Disparador
|
|
1352
|
+
"title": "Disparador al Iniciar Homebridge",
|
|
1281
1353
|
"type": "object",
|
|
1282
1354
|
"properties": {
|
|
1283
1355
|
"isDisabled": {
|
|
@@ -1586,6 +1658,21 @@
|
|
|
1586
1658
|
}
|
|
1587
1659
|
}
|
|
1588
1660
|
},
|
|
1661
|
+
{
|
|
1662
|
+
"if": {
|
|
1663
|
+
"properties": {
|
|
1664
|
+
"accessoryType": { "const": "thermostat" }
|
|
1665
|
+
}
|
|
1666
|
+
},
|
|
1667
|
+
"then": {
|
|
1668
|
+
"required": [ "thermostat" ],
|
|
1669
|
+
"properties": {
|
|
1670
|
+
"thermostat": {
|
|
1671
|
+
"required": [ "temperatureDisplayUnits" ]
|
|
1672
|
+
}
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
},
|
|
1589
1676
|
{
|
|
1590
1677
|
"if": {
|
|
1591
1678
|
"properties": {
|
|
@@ -1792,7 +1879,7 @@
|
|
|
1792
1879
|
},
|
|
1793
1880
|
"": {
|
|
1794
1881
|
"title": " ",
|
|
1795
|
-
"description": "
|
|
1882
|
+
"description": "Nota: Puede cambiar el orden de los accesorios arrastrándolos a una nueva ubicación en la lista. Haga clic en el botón «Guardar» para actualizar la configuración.",
|
|
1796
1883
|
"type": "object",
|
|
1797
1884
|
"properties": {}
|
|
1798
1885
|
}
|