homebridge-easy-mqtt 1.4.0-beta.4 → 1.4.0-beta.6
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 +2 -3
- package/README.md +54 -23
- package/config.schema.json +384 -31
- package/dist/accessory/abstract/helper.js +6 -0
- package/dist/accessory/abstract/helper.js.map +1 -1
- package/dist/accessory/climate/active.d.ts +11 -0
- package/dist/accessory/climate/active.js +44 -0
- package/dist/accessory/climate/active.js.map +1 -0
- package/dist/accessory/climate/heaterCooler.d.ts +2 -6
- package/dist/accessory/climate/heaterCooler.js +3 -37
- package/dist/accessory/climate/heaterCooler.js.map +1 -1
- package/dist/accessory/climate/purifier.d.ts +19 -0
- package/dist/accessory/climate/purifier.js +112 -0
- package/dist/accessory/climate/purifier.js.map +1 -0
- package/dist/accessory/climate/{climate.d.ts → temperatureControl.d.ts} +3 -2
- package/dist/accessory/climate/{climate.js → temperatureControl.js} +7 -5
- package/dist/accessory/climate/temperatureControl.js.map +1 -0
- package/dist/accessory/climate/thermostat.d.ts +2 -2
- package/dist/accessory/climate/thermostat.js +3 -2
- package/dist/accessory/climate/thermostat.js.map +1 -1
- package/dist/accessory/valve.d.ts +14 -0
- package/dist/accessory/valve.js +71 -0
- package/dist/accessory/valve.js.map +1 -0
- package/dist/homebridge-ui/public/index.html +1 -1
- package/dist/homebridge-ui/public/ui.js +1 -1
- package/dist/i18n/en.d.ts +52 -0
- package/dist/i18n/en.js +54 -2
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/fr.d.ts +52 -0
- package/dist/i18n/i18n.d.ts +52 -0
- package/dist/i18n/template.d.ts +52 -0
- package/dist/model/enums.d.ts +17 -2
- package/dist/model/enums.js +16 -0
- package/dist/model/enums.js.map +1 -1
- package/dist/model/types.d.ts +51 -21
- package/package.json +1 -1
- package/dist/accessory/climate/climate.js.map +0 -1
package/config.schema.json
CHANGED
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"type": {
|
|
22
22
|
"type": "string",
|
|
23
23
|
"title": "${config.title.type}",
|
|
24
|
-
"enum": [ "CarbonMonoxideSensor", "CarbonDioxideSensor", "ContactSensor", "HeaterCooler", "HumiditySensor", "LeakSensor", "Lightbulb", "LightSensor", "LockMechanism", "MotionSensor", "OccupancySensor", "Outlet", "SecuritySystem", "SmokeSensor", "Switch", "TemperatureSensor", "Thermostat"],
|
|
25
|
-
"enumNames": ["${config.enumNames.carbonMonoxideSensor}", "${config.enumNames.carbonDioxideSensor}", "${config.enumNames.contactSensor}", "${config.enumNames.heaterCooler}", "${config.enumNames.humiditySensor}", "${config.enumNames.leakSensor}", "${config.enumNames.lightbulb}", "${config.enumNames.lightSensor}", "${config.enumNames.lockMechanism}", "${config.enumNames.motionSensor}", "${config.enumNames.occupancySensor}", "${config.enumNames.outlet}", "${config.enumNames.securitySystem}", "${config.enumNames.smokeSensor}", "${config.enumNames.switch}", "${config.enumNames.temperatureSensor}", "${config.enumNames.thermostat}"],
|
|
24
|
+
"enum": [ "AirPurifier", "CarbonMonoxideSensor", "CarbonDioxideSensor", "ContactSensor", "HeaterCooler", "HumiditySensor", "LeakSensor", "Lightbulb", "LightSensor", "LockMechanism", "MotionSensor", "OccupancySensor", "Outlet", "SecuritySystem", "SmokeSensor", "Switch", "TemperatureSensor", "Thermostat", "Valve"],
|
|
25
|
+
"enumNames": ["${config.enumNames.airPurifier}", "${config.enumNames.carbonMonoxideSensor}", "${config.enumNames.carbonDioxideSensor}", "${config.enumNames.contactSensor}", "${config.enumNames.heaterCooler}", "${config.enumNames.humiditySensor}", "${config.enumNames.leakSensor}", "${config.enumNames.lightbulb}", "${config.enumNames.lightSensor}", "${config.enumNames.lockMechanism}", "${config.enumNames.motionSensor}", "${config.enumNames.occupancySensor}", "${config.enumNames.outlet}", "${config.enumNames.securitySystem}", "${config.enumNames.smokeSensor}", "${config.enumNames.switch}", "${config.enumNames.temperatureSensor}", "${config.enumNames.thermostat}", "${config.enumNames.valve}"],
|
|
26
26
|
"required": true
|
|
27
27
|
},
|
|
28
28
|
"group": {
|
|
@@ -110,9 +110,16 @@
|
|
|
110
110
|
},
|
|
111
111
|
"temperatureUnits": {
|
|
112
112
|
"type": "string",
|
|
113
|
+
"title": "${config.title.sourceUnits}",
|
|
113
114
|
"enum": ["C", "F"],
|
|
114
115
|
"enumNames": ["${config.enumNames.celsius}", "${config.enumNames.fahrenheit}"]
|
|
115
116
|
},
|
|
117
|
+
"valveType": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"title": "${config.title.valveType}",
|
|
120
|
+
"enum": ["GENERIC_VALVE", "IRRIGATION", "SHOWER_HEAD", "WATER_FAUCET"],
|
|
121
|
+
"enumNames": ["${config.enumNames.valveGeneric}", "${config.enumNames.valveIrrigation}", "${config.enumNames.valveShower}", "${config.enumNames.valveFaucet}"]
|
|
122
|
+
},
|
|
116
123
|
"topicGetBatteryLevel": {
|
|
117
124
|
"type": "string",
|
|
118
125
|
"title": "${config.title.topicGetBatteryLevel}"
|
|
@@ -345,6 +352,50 @@
|
|
|
345
352
|
"type": "string",
|
|
346
353
|
"title": "${config.title.topicSetTargetHeaterCoolerState}"
|
|
347
354
|
},
|
|
355
|
+
"topicGetValveActive": {
|
|
356
|
+
"type": "string",
|
|
357
|
+
"title": "${config.title.topicGetValveActive}"
|
|
358
|
+
},
|
|
359
|
+
"topicSetValveActive": {
|
|
360
|
+
"type": "string",
|
|
361
|
+
"title": "${config.title.topicSetValveActive}"
|
|
362
|
+
},
|
|
363
|
+
"topicGetValveInUse": {
|
|
364
|
+
"type": "string",
|
|
365
|
+
"title": "${config.title.topicGetValveInUse}"
|
|
366
|
+
},
|
|
367
|
+
"topicGetValveIsConfigured": {
|
|
368
|
+
"type": "string",
|
|
369
|
+
"title": "${config.title.topicGetValveIsConfigured}"
|
|
370
|
+
},
|
|
371
|
+
"topicSetValveIsConfigured": {
|
|
372
|
+
"type": "string",
|
|
373
|
+
"title": "${config.title.topicSetValveIsConfigured}"
|
|
374
|
+
},
|
|
375
|
+
"topicGetValveRemainingDuration": {
|
|
376
|
+
"type": "string",
|
|
377
|
+
"title": "${config.title.topicGetValveRemainingDuration}"
|
|
378
|
+
},
|
|
379
|
+
"topicGetValveSetDuration": {
|
|
380
|
+
"type": "string",
|
|
381
|
+
"title": "${config.title.topicGetValveSetDuration}"
|
|
382
|
+
},
|
|
383
|
+
"topicSetValveSetDuration": {
|
|
384
|
+
"type": "string",
|
|
385
|
+
"title": "${config.title.topicSetValveSetDuration}"
|
|
386
|
+
},
|
|
387
|
+
"topicGetCurrentPurifierState": {
|
|
388
|
+
"type": "string",
|
|
389
|
+
"title": "${config.title.topicGetCurrentPurifierState}"
|
|
390
|
+
},
|
|
391
|
+
"topicGetTargetPurifierState": {
|
|
392
|
+
"type": "string",
|
|
393
|
+
"title": "${config.title.topicGetTargetPurifierState}"
|
|
394
|
+
},
|
|
395
|
+
"topicSetTargetPurifierState": {
|
|
396
|
+
"type": "string",
|
|
397
|
+
"title": "${config.title.topicSetTargetPurifierState}"
|
|
398
|
+
},
|
|
348
399
|
"valueBatteryLow": {
|
|
349
400
|
"type": "string",
|
|
350
401
|
"title": "${config.title.valueBatteryLow}"
|
|
@@ -481,6 +532,34 @@
|
|
|
481
532
|
"type": "string",
|
|
482
533
|
"title": "${config.title.valueSwingDisabled}"
|
|
483
534
|
},
|
|
535
|
+
"valueActive": {
|
|
536
|
+
"type": "string",
|
|
537
|
+
"title": "${config.title.valueActive}"
|
|
538
|
+
},
|
|
539
|
+
"valueConfigured": {
|
|
540
|
+
"type": "string",
|
|
541
|
+
"title": "${config.title.valueConfigured}"
|
|
542
|
+
},
|
|
543
|
+
"valueNotConfigured": {
|
|
544
|
+
"type": "string",
|
|
545
|
+
"title": "${config.title.valueNotConfigured}"
|
|
546
|
+
},
|
|
547
|
+
"valueInUse": {
|
|
548
|
+
"type": "string",
|
|
549
|
+
"title": "${config.title.valueInUse}"
|
|
550
|
+
},
|
|
551
|
+
"valueInactive": {
|
|
552
|
+
"type": "string",
|
|
553
|
+
"title": "${config.title.valueInactive}"
|
|
554
|
+
},
|
|
555
|
+
"valueModeManual": {
|
|
556
|
+
"type": "string",
|
|
557
|
+
"title": "${config.title.valueModeManual}"
|
|
558
|
+
},
|
|
559
|
+
"valueModePurifying": {
|
|
560
|
+
"type": "string",
|
|
561
|
+
"title": "${config.title.valueModePurifying}"
|
|
562
|
+
},
|
|
484
563
|
"disableLogging": {
|
|
485
564
|
"type": "boolean",
|
|
486
565
|
"title": "${config.title.disableLogging}"
|
|
@@ -678,6 +757,27 @@
|
|
|
678
757
|
"required": ["topicGetCurrentTemperature"]
|
|
679
758
|
}
|
|
680
759
|
},
|
|
760
|
+
{
|
|
761
|
+
"if": {
|
|
762
|
+
"properties": {
|
|
763
|
+
"info": {
|
|
764
|
+
"properties": {
|
|
765
|
+
"type" : {
|
|
766
|
+
"const": "AirPurifier"
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
},
|
|
772
|
+
"then": {
|
|
773
|
+
"required": ["topicGetActive", "topicSetActive", "topicGetCurrentPurifierState", "topicGetTargetPurifierState", "topicSetTargetPurifierState", "valueStateActive", "valueStateInactive"],
|
|
774
|
+
"anyOf": [
|
|
775
|
+
{ "required": ["valueModeIdle"] },
|
|
776
|
+
{ "required": ["valueModeInactive"] },
|
|
777
|
+
{ "required": ["valueModePurifying"] }
|
|
778
|
+
]
|
|
779
|
+
}
|
|
780
|
+
},
|
|
681
781
|
{
|
|
682
782
|
"if": {
|
|
683
783
|
"properties": {
|
|
@@ -757,6 +857,22 @@
|
|
|
757
857
|
{ "required": ["valueAlarmTriggered"] }
|
|
758
858
|
]
|
|
759
859
|
}
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
"if": {
|
|
863
|
+
"properties": {
|
|
864
|
+
"info": {
|
|
865
|
+
"properties": {
|
|
866
|
+
"type" : {
|
|
867
|
+
"const": "Valve"
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
},
|
|
873
|
+
"then": {
|
|
874
|
+
"required": ["topicGetValveActive", "topicGetValveInUse", "topicSetValveActive", "valueActive", "valueInactive", "valueInUse"]
|
|
875
|
+
}
|
|
760
876
|
}
|
|
761
877
|
]
|
|
762
878
|
},
|
|
@@ -798,6 +914,26 @@
|
|
|
798
914
|
}
|
|
799
915
|
]
|
|
800
916
|
},
|
|
917
|
+
{
|
|
918
|
+
"type": "fieldset",
|
|
919
|
+
"notitle": true,
|
|
920
|
+
"condition": {
|
|
921
|
+
"functionBody": "return model.accessories?.[arguments[1]]?.info?.type === 'Valve';"
|
|
922
|
+
},
|
|
923
|
+
"items": [
|
|
924
|
+
{
|
|
925
|
+
"type": "div",
|
|
926
|
+
"displayFlex": true,
|
|
927
|
+
"flex-direction": "row",
|
|
928
|
+
"items": [
|
|
929
|
+
{
|
|
930
|
+
"key": "accessories[].valveType",
|
|
931
|
+
"flex": "0 0 33%"
|
|
932
|
+
}
|
|
933
|
+
]
|
|
934
|
+
}
|
|
935
|
+
]
|
|
936
|
+
},
|
|
801
937
|
"accessories[].mqtt.broker",
|
|
802
938
|
{
|
|
803
939
|
"type": "div",
|
|
@@ -859,6 +995,93 @@
|
|
|
859
995
|
}
|
|
860
996
|
]
|
|
861
997
|
},
|
|
998
|
+
{
|
|
999
|
+
"type": "fieldset",
|
|
1000
|
+
"notitle": true,
|
|
1001
|
+
"condition": {
|
|
1002
|
+
"functionBody": "return model.accessories?.[arguments[1]]?.info?.type === 'Valve';"
|
|
1003
|
+
},
|
|
1004
|
+
"items": [
|
|
1005
|
+
{
|
|
1006
|
+
"type": "div",
|
|
1007
|
+
"displayFlex": true,
|
|
1008
|
+
"flex-direction": "row",
|
|
1009
|
+
"items": [
|
|
1010
|
+
{
|
|
1011
|
+
"key": "accessories[].topicGetValveActive",
|
|
1012
|
+
"flex": "0 0 50%"
|
|
1013
|
+
},
|
|
1014
|
+
{
|
|
1015
|
+
"key": "accessories[].topicSetValveActive",
|
|
1016
|
+
"flex": "0 0 50%"
|
|
1017
|
+
}
|
|
1018
|
+
]
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
"type": "div",
|
|
1022
|
+
"displayFlex": true,
|
|
1023
|
+
"flex-direction": "row",
|
|
1024
|
+
"items": [
|
|
1025
|
+
{
|
|
1026
|
+
"key": "accessories[].topicGetValveInUse",
|
|
1027
|
+
"flex": "0 0 50%"
|
|
1028
|
+
}
|
|
1029
|
+
]
|
|
1030
|
+
},
|
|
1031
|
+
{
|
|
1032
|
+
"type": "div",
|
|
1033
|
+
"displayFlex": true,
|
|
1034
|
+
"flex-direction": "row",
|
|
1035
|
+
"items": [
|
|
1036
|
+
{
|
|
1037
|
+
"key": "accessories[].topicGetValveIsConfigured",
|
|
1038
|
+
"flex": "0 0 50%"
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
"key": "accessories[].topicSetValveIsConfigured",
|
|
1042
|
+
"flex": "0 0 50%"
|
|
1043
|
+
}
|
|
1044
|
+
]
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
"type": "div",
|
|
1048
|
+
"displayFlex": true,
|
|
1049
|
+
"flex-direction": "row",
|
|
1050
|
+
"items": [
|
|
1051
|
+
{
|
|
1052
|
+
"key": "accessories[].topicGetValveSetDuration",
|
|
1053
|
+
"flex": "0 0 50%"
|
|
1054
|
+
},
|
|
1055
|
+
{
|
|
1056
|
+
"key": "accessories[].topicSetValveSetDuration",
|
|
1057
|
+
"flex": "0 0 50%"
|
|
1058
|
+
}
|
|
1059
|
+
]
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
"type": "div",
|
|
1063
|
+
"displayFlex": true,
|
|
1064
|
+
"flex-direction": "row",
|
|
1065
|
+
"items": [
|
|
1066
|
+
{
|
|
1067
|
+
"key": "accessories[].topicGetValveRemainingDuration",
|
|
1068
|
+
"flex": "0 0 50%"
|
|
1069
|
+
}
|
|
1070
|
+
]
|
|
1071
|
+
},
|
|
1072
|
+
{
|
|
1073
|
+
"type": "div",
|
|
1074
|
+
"displayFlex": true,
|
|
1075
|
+
"flex-direction": "row",
|
|
1076
|
+
"items": [
|
|
1077
|
+
{
|
|
1078
|
+
"key": "accessories[].topicGetStatusFault",
|
|
1079
|
+
"flex": "0 0 50%"
|
|
1080
|
+
}
|
|
1081
|
+
]
|
|
1082
|
+
}
|
|
1083
|
+
]
|
|
1084
|
+
},
|
|
862
1085
|
{
|
|
863
1086
|
"type": "fieldset",
|
|
864
1087
|
"notitle": true,
|
|
@@ -1110,7 +1333,7 @@
|
|
|
1110
1333
|
"type": "fieldset",
|
|
1111
1334
|
"notitle": true,
|
|
1112
1335
|
"condition": {
|
|
1113
|
-
"functionBody": "return model.accessories?.[arguments[1]]?.info?.type === '
|
|
1336
|
+
"functionBody": "return model.accessories?.[arguments[1]]?.info?.type === 'AirPurifier';"
|
|
1114
1337
|
},
|
|
1115
1338
|
"items": [
|
|
1116
1339
|
{
|
|
@@ -1119,13 +1342,8 @@
|
|
|
1119
1342
|
"flex-direction": "row",
|
|
1120
1343
|
"items": [
|
|
1121
1344
|
{
|
|
1122
|
-
"key": "accessories[].
|
|
1345
|
+
"key": "accessories[].topicGetCurrentPurifierState",
|
|
1123
1346
|
"flex": "0 0 50%"
|
|
1124
|
-
},
|
|
1125
|
-
{
|
|
1126
|
-
"key": "accessories[].temperatureUnits",
|
|
1127
|
-
"title": "${config.title.sourceUnits}",
|
|
1128
|
-
"flex": "0 0 25%"
|
|
1129
1347
|
}
|
|
1130
1348
|
]
|
|
1131
1349
|
},
|
|
@@ -1135,23 +1353,36 @@
|
|
|
1135
1353
|
"flex-direction": "row",
|
|
1136
1354
|
"items": [
|
|
1137
1355
|
{
|
|
1138
|
-
"key": "accessories[].
|
|
1356
|
+
"key": "accessories[].topicGetTargetPurifierState",
|
|
1139
1357
|
"flex": "0 0 50%"
|
|
1140
1358
|
},
|
|
1141
1359
|
{
|
|
1142
|
-
"key": "accessories[].
|
|
1360
|
+
"key": "accessories[].topicSetTargetPurifierState",
|
|
1143
1361
|
"flex": "0 0 50%"
|
|
1144
1362
|
}
|
|
1145
1363
|
]
|
|
1146
|
-
}
|
|
1364
|
+
}
|
|
1365
|
+
]
|
|
1366
|
+
},
|
|
1367
|
+
{
|
|
1368
|
+
"type": "fieldset",
|
|
1369
|
+
"notitle": true,
|
|
1370
|
+
"condition": {
|
|
1371
|
+
"functionBody": "return model.accessories?.[arguments[1]]?.info?.type === 'HeaterCooler';"
|
|
1372
|
+
},
|
|
1373
|
+
"items": [
|
|
1147
1374
|
{
|
|
1148
1375
|
"type": "div",
|
|
1149
1376
|
"displayFlex": true,
|
|
1150
1377
|
"flex-direction": "row",
|
|
1151
1378
|
"items": [
|
|
1152
1379
|
{
|
|
1153
|
-
"key": "accessories[].
|
|
1380
|
+
"key": "accessories[].topicGetCurrentTemperature",
|
|
1154
1381
|
"flex": "0 0 50%"
|
|
1382
|
+
},
|
|
1383
|
+
{
|
|
1384
|
+
"key": "accessories[].temperatureUnits",
|
|
1385
|
+
"flex": "0 0 25%"
|
|
1155
1386
|
}
|
|
1156
1387
|
]
|
|
1157
1388
|
},
|
|
@@ -1161,11 +1392,7 @@
|
|
|
1161
1392
|
"flex-direction": "row",
|
|
1162
1393
|
"items": [
|
|
1163
1394
|
{
|
|
1164
|
-
"key": "accessories[].
|
|
1165
|
-
"flex": "0 0 50%"
|
|
1166
|
-
},
|
|
1167
|
-
{
|
|
1168
|
-
"key": "accessories[].topicSetTargetHeaterCoolerState",
|
|
1395
|
+
"key": "accessories[].topicGetCurrentHeaterCoolerState",
|
|
1169
1396
|
"flex": "0 0 50%"
|
|
1170
1397
|
}
|
|
1171
1398
|
]
|
|
@@ -1176,30 +1403,48 @@
|
|
|
1176
1403
|
"flex-direction": "row",
|
|
1177
1404
|
"items": [
|
|
1178
1405
|
{
|
|
1179
|
-
"key": "accessories[].
|
|
1406
|
+
"key": "accessories[].topicGetTargetHeaterCoolerState",
|
|
1180
1407
|
"flex": "0 0 50%"
|
|
1181
1408
|
},
|
|
1182
1409
|
{
|
|
1183
|
-
"key": "accessories[].
|
|
1410
|
+
"key": "accessories[].topicSetTargetHeaterCoolerState",
|
|
1184
1411
|
"flex": "0 0 50%"
|
|
1185
1412
|
}
|
|
1186
1413
|
]
|
|
1187
|
-
}
|
|
1414
|
+
}
|
|
1415
|
+
]
|
|
1416
|
+
},
|
|
1417
|
+
{
|
|
1418
|
+
"type": "fieldset",
|
|
1419
|
+
"notitle": true,
|
|
1420
|
+
"condition": {
|
|
1421
|
+
"functionBody": "return ['HeaterCooler', 'AirPurifier'].includes(model.accessories?.[arguments[1]]?.info?.type);"
|
|
1422
|
+
},
|
|
1423
|
+
"items": [
|
|
1188
1424
|
{
|
|
1189
1425
|
"type": "div",
|
|
1190
1426
|
"displayFlex": true,
|
|
1191
1427
|
"flex-direction": "row",
|
|
1192
1428
|
"items": [
|
|
1193
1429
|
{
|
|
1194
|
-
"key": "accessories[].
|
|
1430
|
+
"key": "accessories[].topicGetActive",
|
|
1195
1431
|
"flex": "0 0 50%"
|
|
1196
1432
|
},
|
|
1197
1433
|
{
|
|
1198
|
-
"key": "accessories[].
|
|
1434
|
+
"key": "accessories[].topicSetActive",
|
|
1199
1435
|
"flex": "0 0 50%"
|
|
1200
1436
|
}
|
|
1201
1437
|
]
|
|
1202
|
-
}
|
|
1438
|
+
}
|
|
1439
|
+
]
|
|
1440
|
+
},
|
|
1441
|
+
{
|
|
1442
|
+
"type": "fieldset",
|
|
1443
|
+
"notitle": true,
|
|
1444
|
+
"condition": {
|
|
1445
|
+
"functionBody": "return ['HeaterCooler', 'AirPurifier'].includes(model.accessories?.[arguments[1]]?.info?.type);"
|
|
1446
|
+
},
|
|
1447
|
+
"items": [
|
|
1203
1448
|
{
|
|
1204
1449
|
"type": "div",
|
|
1205
1450
|
"displayFlex": true,
|
|
@@ -1345,7 +1590,6 @@
|
|
|
1345
1590
|
},
|
|
1346
1591
|
{
|
|
1347
1592
|
"key": "accessories[].temperatureUnits",
|
|
1348
|
-
"title": "${config.title.sourceUnits}",
|
|
1349
1593
|
"flex": "0 0 33%"
|
|
1350
1594
|
}
|
|
1351
1595
|
]
|
|
@@ -1394,7 +1638,6 @@
|
|
|
1394
1638
|
},
|
|
1395
1639
|
{
|
|
1396
1640
|
"key": "accessories[].temperatureUnits",
|
|
1397
|
-
"title": "${config.title.sourceUnits}",
|
|
1398
1641
|
"flex": "0 0 25%"
|
|
1399
1642
|
}
|
|
1400
1643
|
]
|
|
@@ -1440,7 +1683,16 @@
|
|
|
1440
1683
|
"flex": "0 0 50%"
|
|
1441
1684
|
}
|
|
1442
1685
|
]
|
|
1443
|
-
}
|
|
1686
|
+
}
|
|
1687
|
+
]
|
|
1688
|
+
},
|
|
1689
|
+
{
|
|
1690
|
+
"type": "fieldset",
|
|
1691
|
+
"notitle": true,
|
|
1692
|
+
"condition": {
|
|
1693
|
+
"functionBody": "return ['HeaterCooler', 'Thermostat'].includes(model.accessories?.[arguments[1]]?.info?.type);"
|
|
1694
|
+
},
|
|
1695
|
+
"items": [
|
|
1444
1696
|
{
|
|
1445
1697
|
"type": "div",
|
|
1446
1698
|
"displayFlex": true,
|
|
@@ -1526,11 +1778,11 @@
|
|
|
1526
1778
|
"functionBody": "return model.accessories?.[arguments[1]]?.info?.type !== undefined;"
|
|
1527
1779
|
},
|
|
1528
1780
|
"items": [
|
|
1529
|
-
|
|
1781
|
+
{
|
|
1530
1782
|
"type": "fieldset",
|
|
1531
1783
|
"notitle": true,
|
|
1532
1784
|
"condition": {
|
|
1533
|
-
"functionBody": "return model.accessories?.[arguments[1]]?.info?.type
|
|
1785
|
+
"functionBody": "return ['HeaterCooler', 'AirPurifier'].includes(model.accessories?.[arguments[1]]?.info?.type);"
|
|
1534
1786
|
},
|
|
1535
1787
|
"items": [
|
|
1536
1788
|
{
|
|
@@ -1547,7 +1799,52 @@
|
|
|
1547
1799
|
"flex": "0 0 20%"
|
|
1548
1800
|
}
|
|
1549
1801
|
]
|
|
1550
|
-
}
|
|
1802
|
+
}
|
|
1803
|
+
]
|
|
1804
|
+
},
|
|
1805
|
+
{
|
|
1806
|
+
"type": "fieldset",
|
|
1807
|
+
"notitle": true,
|
|
1808
|
+
"condition": {
|
|
1809
|
+
"functionBody": "return model.accessories?.[arguments[1]]?.info?.type === 'AirPurifier';"
|
|
1810
|
+
},
|
|
1811
|
+
"items": [
|
|
1812
|
+
{
|
|
1813
|
+
"type": "div",
|
|
1814
|
+
"displayFlex": true,
|
|
1815
|
+
"flex-direction": "row",
|
|
1816
|
+
"items": [
|
|
1817
|
+
{
|
|
1818
|
+
"key": "accessories[].valueModeAuto",
|
|
1819
|
+
"flex": "0 0 20%"
|
|
1820
|
+
},
|
|
1821
|
+
{
|
|
1822
|
+
"key": "accessories[].valueModeManual",
|
|
1823
|
+
"flex": "0 0 20%"
|
|
1824
|
+
},
|
|
1825
|
+
{
|
|
1826
|
+
"key": "accessories[].valueModePurifying",
|
|
1827
|
+
"flex": "0 0 20%"
|
|
1828
|
+
},
|
|
1829
|
+
{
|
|
1830
|
+
"key": "accessories[].valueModeIdle",
|
|
1831
|
+
"flex": "0 0 20%"
|
|
1832
|
+
},
|
|
1833
|
+
{
|
|
1834
|
+
"key": "accessories[].valueModeInactive",
|
|
1835
|
+
"flex": "0 0 20%"
|
|
1836
|
+
}
|
|
1837
|
+
]
|
|
1838
|
+
}
|
|
1839
|
+
]
|
|
1840
|
+
},
|
|
1841
|
+
{
|
|
1842
|
+
"type": "fieldset",
|
|
1843
|
+
"notitle": true,
|
|
1844
|
+
"condition": {
|
|
1845
|
+
"functionBody": "return model.accessories?.[arguments[1]]?.info?.type === 'HeaterCooler';"
|
|
1846
|
+
},
|
|
1847
|
+
"items": [
|
|
1551
1848
|
{
|
|
1552
1849
|
"type": "div",
|
|
1553
1850
|
"displayFlex": true,
|
|
@@ -1574,7 +1871,16 @@
|
|
|
1574
1871
|
"flex": "0 0 20%"
|
|
1575
1872
|
}
|
|
1576
1873
|
]
|
|
1577
|
-
}
|
|
1874
|
+
}
|
|
1875
|
+
]
|
|
1876
|
+
},
|
|
1877
|
+
{
|
|
1878
|
+
"type": "fieldset",
|
|
1879
|
+
"notitle": true,
|
|
1880
|
+
"condition": {
|
|
1881
|
+
"functionBody": "return ['HeaterCooler', 'AirPurifier'].includes(model.accessories?.[arguments[1]]?.info?.type);"
|
|
1882
|
+
},
|
|
1883
|
+
"items": [
|
|
1578
1884
|
{
|
|
1579
1885
|
"type": "div",
|
|
1580
1886
|
"displayFlex": true,
|
|
@@ -1622,6 +1928,53 @@
|
|
|
1622
1928
|
}
|
|
1623
1929
|
]
|
|
1624
1930
|
},
|
|
1931
|
+
{
|
|
1932
|
+
"type": "fieldset",
|
|
1933
|
+
"notitle": true,
|
|
1934
|
+
"condition": {
|
|
1935
|
+
"functionBody": "return model.accessories?.[arguments[1]]?.info?.type === 'Valve';"
|
|
1936
|
+
},
|
|
1937
|
+
"items": [
|
|
1938
|
+
{
|
|
1939
|
+
"type": "div",
|
|
1940
|
+
"displayFlex": true,
|
|
1941
|
+
"flex-direction": "row",
|
|
1942
|
+
"items": [
|
|
1943
|
+
{
|
|
1944
|
+
"key": "accessories[].valueActive",
|
|
1945
|
+
"flex": "0 0 25%"
|
|
1946
|
+
},
|
|
1947
|
+
{
|
|
1948
|
+
"key": "accessories[].valueInactive",
|
|
1949
|
+
"flex": "0 0 25%"
|
|
1950
|
+
},
|
|
1951
|
+
{
|
|
1952
|
+
"key": "accessories[].valueInUse",
|
|
1953
|
+
"flex": "0 0 25%"
|
|
1954
|
+
}
|
|
1955
|
+
]
|
|
1956
|
+
},
|
|
1957
|
+
{
|
|
1958
|
+
"type": "div",
|
|
1959
|
+
"displayFlex": true,
|
|
1960
|
+
"flex-direction": "row",
|
|
1961
|
+
"items": [
|
|
1962
|
+
{
|
|
1963
|
+
"key": "accessories[].valueConfigured",
|
|
1964
|
+
"flex": "0 0 25%"
|
|
1965
|
+
},
|
|
1966
|
+
{
|
|
1967
|
+
"key": "accessories[].valueNotConfigured",
|
|
1968
|
+
"flex": "0 0 25%"
|
|
1969
|
+
},
|
|
1970
|
+
{
|
|
1971
|
+
"key": "accessories[].valueFault",
|
|
1972
|
+
"flex": "0 0 25%"
|
|
1973
|
+
}
|
|
1974
|
+
]
|
|
1975
|
+
}
|
|
1976
|
+
]
|
|
1977
|
+
},
|
|
1625
1978
|
{
|
|
1626
1979
|
"type": "div",
|
|
1627
1980
|
"displayFlex": true,
|
|
@@ -3,6 +3,7 @@ import { AccessoryType } from '../../model/enums.js';
|
|
|
3
3
|
import { LockMechanismAccessory } from '../lock.js';
|
|
4
4
|
import { SecuritySystemAccessory } from '../security.js';
|
|
5
5
|
import { HeaterCoolerAccessory } from '../climate/heaterCooler.js';
|
|
6
|
+
import { PurifierAccessory } from '../climate/purifier.js';
|
|
6
7
|
import { ThermostatAccessory } from '../climate/thermostat.js';
|
|
7
8
|
import { LightbulbAccessory } from '../onoff/lightbulb.js';
|
|
8
9
|
import { OutletAccessory } from '../onoff/outlet.js';
|
|
@@ -17,6 +18,7 @@ import { MotionSensorAccessory } from '../sensor/motion.js';
|
|
|
17
18
|
import { OccupancySensorAccessory } from '../sensor/occupancy.js';
|
|
18
19
|
import { SmokeSensorAccessory } from '../sensor/smoke.js';
|
|
19
20
|
import { TemperatureSensorAccessory } from '../sensor/temperature.js';
|
|
21
|
+
import { ValveAccessory } from '../valve.js';
|
|
20
22
|
export function createAccessory(Service, Characteristic, platformAccessory, accessoryConfig, log, isGrouped = false) {
|
|
21
23
|
switch (accessoryConfig.info.type) {
|
|
22
24
|
case AccessoryType.CarbonDioxideSensor:
|
|
@@ -27,6 +29,8 @@ export function createAccessory(Service, Characteristic, platformAccessory, acce
|
|
|
27
29
|
return new ContactSensorAccessory(Service, Characteristic, platformAccessory, accessoryConfig, log, isGrouped);
|
|
28
30
|
case AccessoryType.HeaterCooler:
|
|
29
31
|
return new HeaterCoolerAccessory(Service, Characteristic, platformAccessory, accessoryConfig, log, isGrouped);
|
|
32
|
+
case AccessoryType.AirPurifier:
|
|
33
|
+
return new PurifierAccessory(Service, Characteristic, platformAccessory, accessoryConfig, log, isGrouped);
|
|
30
34
|
case AccessoryType.HumiditySensor:
|
|
31
35
|
return new HumiditySensorAccessory(Service, Characteristic, platformAccessory, accessoryConfig, log, isGrouped);
|
|
32
36
|
case AccessoryType.LeakSensor:
|
|
@@ -53,6 +57,8 @@ export function createAccessory(Service, Characteristic, platformAccessory, acce
|
|
|
53
57
|
return new TemperatureSensorAccessory(Service, Characteristic, platformAccessory, accessoryConfig, log, isGrouped);
|
|
54
58
|
case AccessoryType.Thermostat:
|
|
55
59
|
return new ThermostatAccessory(Service, Characteristic, platformAccessory, accessoryConfig, log, isGrouped);
|
|
60
|
+
case AccessoryType.Valve:
|
|
61
|
+
return new ValveAccessory(Service, Characteristic, platformAccessory, accessoryConfig, log, isGrouped);
|
|
56
62
|
}
|
|
57
63
|
log.error(strings.startup.unsupportedType, accessoryConfig.info.type);
|
|
58
64
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/accessory/abstract/helper.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAGrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAA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,CAAC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAuC,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;QAClI,KAAK,aAAa,CAAC,cAAc;YAC/B,OAAO,IAAI,uBAAuB,CAAC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAyC,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;QAC5I,KAAK,aAAa,CAAC,WAAW;YAC5B,OAAO,IAAI,oBAAoB,CAAC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAA4C,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;QAC5I,KAAK,aAAa,CAAC,MAAM;YACvB,OAAO,IAAI,eAAe,CAAC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAuC,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;QAClI,KAAK,aAAa,CAAC,iBAAiB;YAClC,OAAO,IAAI,0BAA0B,CAAC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAkD,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;QACxJ,KAAK,aAAa,CAAC,UAAU;YAC3B,OAAO,IAAI,mBAAmB,CAAC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAA2C,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;QAC1I,KAAK,aAAa,CAAC,KAAK;YACtB,OAAO,IAAI,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAsC,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;IAChI,CAAC;IAED,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,eAAe,EAAE,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACxE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PlatformAccessory } from 'homebridge';
|
|
2
|
+
import { TemperatureControlAccessory } from './temperatureControl.js';
|
|
3
|
+
import { CharacteristicType, ActiveClimateConfig, ServiceType } from '../../model/types.js';
|
|
4
|
+
import { Log } from '../../tools/log.js';
|
|
5
|
+
export declare abstract class ActiveClimateAccessory<C extends ActiveClimateConfig = ActiveClimateConfig> extends TemperatureControlAccessory<C> {
|
|
6
|
+
constructor(Service: ServiceType, Characteristic: CharacteristicType, accessory: PlatformAccessory, config: C, log: Log, isGrouped: boolean);
|
|
7
|
+
private onSetActive;
|
|
8
|
+
private onSetLockControls;
|
|
9
|
+
private onSetRotationSpeed;
|
|
10
|
+
private onSetSwingMode;
|
|
11
|
+
}
|