homebridge-easy-mqtt 1.4.0-beta.3 → 1.4.0-beta.5
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 +3 -3
- package/README.md +23 -5
- package/config.schema.json +514 -13
- package/dist/accessory/abstract/helper.js +3 -0
- package/dist/accessory/abstract/helper.js.map +1 -1
- package/dist/accessory/climate/heaterCooler.js +2 -2
- package/dist/accessory/climate/heaterCooler.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/platform.js +1 -1
- package/dist/homebridge/platform.js.map +1 -1
- package/dist/homebridge-ui/public/index.html +1 -1
- package/dist/homebridge-ui/public/ui.js +1 -1
- package/dist/i18n/en.d.ts +36 -2
- package/dist/i18n/en.js +36 -2
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/fr.d.ts +36 -2
- package/dist/i18n/i18n.d.ts +36 -2
- package/dist/i18n/template.d.ts +36 -2
- package/dist/model/enums.d.ts +14 -2
- package/dist/model/enums.js +13 -0
- package/dist/model/enums.js.map +1 -1
- package/dist/model/types.d.ts +21 -3
- package/package.json +1 -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": [ "CarbonMonoxideSensor", "CarbonDioxideSensor", "ContactSensor", "HeaterCooler", "HumiditySensor", "LeakSensor", "Lightbulb", "LightSensor", "LockMechanism", "MotionSensor", "OccupancySensor", "Outlet", "SecuritySystem", "SmokeSensor", "Switch", "TemperatureSensor", "Thermostat", "Valve"],
|
|
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}", "${config.enumNames.valve}"],
|
|
26
26
|
"required": true
|
|
27
27
|
},
|
|
28
28
|
"group": {
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"type": "string",
|
|
55
55
|
"title": "${config.title.broker}",
|
|
56
56
|
"placeholder": "mqtts://192.168.0.1:1883",
|
|
57
|
+
"pattern": "^(https?|mqtts?|wss?|ftp):\\/\\/([\\w.-]+)(:\\d+)?(\\/.*)?$",
|
|
57
58
|
"required": true
|
|
58
59
|
},
|
|
59
60
|
"username": {
|
|
@@ -68,7 +69,8 @@
|
|
|
68
69
|
"type": "string",
|
|
69
70
|
"title": "${config.title.options}",
|
|
70
71
|
"description": "${config.description.options}",
|
|
71
|
-
"placeholder": "{ \"protocolVersion\": \"4\", \"clientId\": \"my-client-id\", \"rejectUnauthorized\": true }"
|
|
72
|
+
"placeholder": "{ \"protocolVersion\": \"4\", \"clientId\": \"my-client-id\", \"rejectUnauthorized\": true }",
|
|
73
|
+
"pattern": "^\\{\\s*(?:\"[^\"\\\\\\r\\n]*\"\\s*:\\s*(?:\"[^\"\\\\\\r\\n]*\"|[0-9.+-eE]+|true|false|null)\\s*,\\s*)*(?:\"[^\"\\\\\\r\\n]*\"\\s*:\\s*(?:\"[^\"\\\\\\r\\n]*\"|[0-9.+-eE]+|true|false|null)\\s*)?\\}$"
|
|
72
74
|
}
|
|
73
75
|
}
|
|
74
76
|
},
|
|
@@ -108,9 +110,16 @@
|
|
|
108
110
|
},
|
|
109
111
|
"temperatureUnits": {
|
|
110
112
|
"type": "string",
|
|
113
|
+
"title": "${config.title.sourceUnits}",
|
|
111
114
|
"enum": ["C", "F"],
|
|
112
115
|
"enumNames": ["${config.enumNames.celsius}", "${config.enumNames.fahrenheit}"]
|
|
113
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
|
+
},
|
|
114
123
|
"topicGetBatteryLevel": {
|
|
115
124
|
"type": "string",
|
|
116
125
|
"title": "${config.title.topicGetBatteryLevel}"
|
|
@@ -299,9 +308,9 @@
|
|
|
299
308
|
"type": "string",
|
|
300
309
|
"title": "${config.title.topicSetHeatingThresholdTemperature}"
|
|
301
310
|
},
|
|
302
|
-
"
|
|
311
|
+
"topicGetHeaterCoolerActive": {
|
|
303
312
|
"type": "string",
|
|
304
|
-
"title": "${config.title.
|
|
313
|
+
"title": "${config.title.topicGetHeaterCoolerActive}"
|
|
305
314
|
},
|
|
306
315
|
"topicGetCurrentHeaterCoolerState": {
|
|
307
316
|
"type": "string",
|
|
@@ -323,9 +332,9 @@
|
|
|
323
332
|
"type": "string",
|
|
324
333
|
"title": "${config.title.topicGetTargetHeaterCoolerState}"
|
|
325
334
|
},
|
|
326
|
-
"
|
|
335
|
+
"topicSetHeaterCoolerActive": {
|
|
327
336
|
"type": "string",
|
|
328
|
-
"title": "${config.title.
|
|
337
|
+
"title": "${config.title.topicSetHeaterCoolerActive}"
|
|
329
338
|
},
|
|
330
339
|
"topicSetLockPhysicalControls": {
|
|
331
340
|
"type": "string",
|
|
@@ -343,6 +352,38 @@
|
|
|
343
352
|
"type": "string",
|
|
344
353
|
"title": "${config.title.topicSetTargetHeaterCoolerState}"
|
|
345
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
|
+
},
|
|
346
387
|
"valueBatteryLow": {
|
|
347
388
|
"type": "string",
|
|
348
389
|
"title": "${config.title.valueBatteryLow}"
|
|
@@ -479,11 +520,320 @@
|
|
|
479
520
|
"type": "string",
|
|
480
521
|
"title": "${config.title.valueSwingDisabled}"
|
|
481
522
|
},
|
|
523
|
+
"valueActive": {
|
|
524
|
+
"type": "string",
|
|
525
|
+
"title": "${config.title.valueActive}"
|
|
526
|
+
},
|
|
527
|
+
"valueConfigured": {
|
|
528
|
+
"type": "string",
|
|
529
|
+
"title": "${config.title.valueConfigured}"
|
|
530
|
+
},
|
|
531
|
+
"valueNotConfigured": {
|
|
532
|
+
"type": "string",
|
|
533
|
+
"title": "${config.title.valueNotConfigured}"
|
|
534
|
+
},
|
|
535
|
+
"valueInUse": {
|
|
536
|
+
"type": "string",
|
|
537
|
+
"title": "${config.title.valueInUse}"
|
|
538
|
+
},
|
|
539
|
+
"valueInactive": {
|
|
540
|
+
"type": "string",
|
|
541
|
+
"title": "${config.title.valueInactive}"
|
|
542
|
+
},
|
|
482
543
|
"disableLogging": {
|
|
483
544
|
"type": "boolean",
|
|
484
545
|
"title": "${config.title.disableLogging}"
|
|
485
546
|
}
|
|
486
|
-
}
|
|
547
|
+
},
|
|
548
|
+
"allOf": [
|
|
549
|
+
{
|
|
550
|
+
"if": {
|
|
551
|
+
"properties": {
|
|
552
|
+
"info": {
|
|
553
|
+
"properties": {
|
|
554
|
+
"type" : {
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
"then": {
|
|
561
|
+
"required": ["mqtt"]
|
|
562
|
+
}
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
"if": {
|
|
566
|
+
"properties": {
|
|
567
|
+
"info": {
|
|
568
|
+
"properties": {
|
|
569
|
+
"type" : {
|
|
570
|
+
"enum": ["Lightbulb", "Outlet", "Switch"]
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
"then": {
|
|
577
|
+
"required": ["topicGetOn", "topicSetOn", "valueOn", "valueOff"]
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
"if": {
|
|
582
|
+
"properties": {
|
|
583
|
+
"info": {
|
|
584
|
+
"properties": {
|
|
585
|
+
"type" : {
|
|
586
|
+
"const": "CarbonDioxideSensor"
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
"then": {
|
|
593
|
+
"required": ["topicGetCarbonDioxideDetected", "valueCarbonDioxideDetected"]
|
|
594
|
+
}
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
"if": {
|
|
598
|
+
"properties": {
|
|
599
|
+
"info": {
|
|
600
|
+
"properties": {
|
|
601
|
+
"type" : {
|
|
602
|
+
"const": "CarbonMonoxideSensor"
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
},
|
|
608
|
+
"then": {
|
|
609
|
+
"required": ["topicGetCarbonMonoxideDetected", "valueCarbonMonoxideDetected"]
|
|
610
|
+
}
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
"if": {
|
|
614
|
+
"properties": {
|
|
615
|
+
"info": {
|
|
616
|
+
"properties": {
|
|
617
|
+
"type" : {
|
|
618
|
+
"const": "ContactSensor"
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
},
|
|
624
|
+
"then": {
|
|
625
|
+
"required": ["topicGetContactSensorState", "valueContactDetected"]
|
|
626
|
+
}
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
"if": {
|
|
630
|
+
"properties": {
|
|
631
|
+
"info": {
|
|
632
|
+
"properties": {
|
|
633
|
+
"type" : {
|
|
634
|
+
"const": "HumiditySensor"
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
},
|
|
640
|
+
"then": {
|
|
641
|
+
"required": ["topicGetCurrentRelativeHumidity"]
|
|
642
|
+
}
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
"if": {
|
|
646
|
+
"properties": {
|
|
647
|
+
"info": {
|
|
648
|
+
"properties": {
|
|
649
|
+
"type" : {
|
|
650
|
+
"const": "LeakSensor"
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
},
|
|
656
|
+
"then": {
|
|
657
|
+
"required": ["topicGetLeakDetected", "valueLeakDetected"]
|
|
658
|
+
}
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
"if": {
|
|
662
|
+
"properties": {
|
|
663
|
+
"info": {
|
|
664
|
+
"properties": {
|
|
665
|
+
"type" : {
|
|
666
|
+
"const": "LightSensor"
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
"then": {
|
|
673
|
+
"required": ["topicGetCurrentAmbientLightLevel"]
|
|
674
|
+
}
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
"if": {
|
|
678
|
+
"properties": {
|
|
679
|
+
"info": {
|
|
680
|
+
"properties": {
|
|
681
|
+
"type" : {
|
|
682
|
+
"const": "MotionSensor"
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
},
|
|
688
|
+
"then": {
|
|
689
|
+
"required": ["topicGetMotionDetected", "valueMotionDetected"]
|
|
690
|
+
}
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
"if": {
|
|
694
|
+
"properties": {
|
|
695
|
+
"info": {
|
|
696
|
+
"properties": {
|
|
697
|
+
"type" : {
|
|
698
|
+
"const": "OccupancySensor"
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
},
|
|
704
|
+
"then": {
|
|
705
|
+
"required": ["topicGetOccupancyDetected", "valueOccupancyDetected"]
|
|
706
|
+
}
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
"if": {
|
|
710
|
+
"properties": {
|
|
711
|
+
"info": {
|
|
712
|
+
"properties": {
|
|
713
|
+
"type" : {
|
|
714
|
+
"const": "SmokeSensor"
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
},
|
|
720
|
+
"then": {
|
|
721
|
+
"required": ["topicGetSmokeDetected", "valueSmokeDetected"]
|
|
722
|
+
}
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
"if": {
|
|
726
|
+
"properties": {
|
|
727
|
+
"info": {
|
|
728
|
+
"properties": {
|
|
729
|
+
"type" : {
|
|
730
|
+
"const": "TemperatureSensor"
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
},
|
|
736
|
+
"then": {
|
|
737
|
+
"required": ["topicGetCurrentTemperature"]
|
|
738
|
+
}
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
"if": {
|
|
742
|
+
"properties": {
|
|
743
|
+
"info": {
|
|
744
|
+
"properties": {
|
|
745
|
+
"type" : {
|
|
746
|
+
"const": "HeaterCooler"
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
},
|
|
752
|
+
"then": {
|
|
753
|
+
"required": ["topicGetHeaterCoolerActive", "topicSetHeaterCoolerActive", "topicGetCurrentHeaterCoolerState", "topicGetCurrentTemperature", "topicGetTargetHeaterCoolerState", "topicSetTargetHeaterCoolerState", "valueStateActive", "valueStateInactive"],
|
|
754
|
+
"anyOf": [
|
|
755
|
+
{ "required": ["valueModeCool"] },
|
|
756
|
+
{ "required": ["valueModeHeat"] }
|
|
757
|
+
]
|
|
758
|
+
}
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
"if": {
|
|
762
|
+
"properties": {
|
|
763
|
+
"info": {
|
|
764
|
+
"properties": {
|
|
765
|
+
"type" : {
|
|
766
|
+
"const": "Thermostat"
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
},
|
|
772
|
+
"then": {
|
|
773
|
+
"required": ["topicGetCurrentHeatingCoolingState", "topicGetTargetHeatingCoolingState", "topicSetTargetHeatingCoolingState", "topicGetCurrentTemperature", "topicGetTargetTemperature", "topicSetTargetTemperature"],
|
|
774
|
+
"anyOf": [
|
|
775
|
+
{ "required": ["valueModeCool"] },
|
|
776
|
+
{ "required": ["valueModeHeat"] },
|
|
777
|
+
{ "required": ["valueModeOff"] }
|
|
778
|
+
]
|
|
779
|
+
}
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
"if": {
|
|
783
|
+
"properties": {
|
|
784
|
+
"info": {
|
|
785
|
+
"properties": {
|
|
786
|
+
"type" : {
|
|
787
|
+
"const": "LockMechanism"
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
},
|
|
793
|
+
"then": {
|
|
794
|
+
"required": ["topicGetCurrentLockState", "topicGetTargetLockState", "topicSetTargetLockState", "valueLockStateSecured", "valueLockStateUnsecured"]
|
|
795
|
+
}
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
"if": {
|
|
799
|
+
"properties": {
|
|
800
|
+
"info": {
|
|
801
|
+
"properties": {
|
|
802
|
+
"type" : {
|
|
803
|
+
"const": "SecuritySystem"
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
},
|
|
809
|
+
"then": {
|
|
810
|
+
"required": ["topicGetCurrentSecurityState", "topicGetTargetSecurityState", "topicSetTargetSecurityState"],
|
|
811
|
+
"anyOf": [
|
|
812
|
+
{ "required": ["valueArmStay"] },
|
|
813
|
+
{ "required": ["valueArmAway"] },
|
|
814
|
+
{ "required": ["valueArmNight"] },
|
|
815
|
+
{ "required": ["valueDisarm"] },
|
|
816
|
+
{ "required": ["valueAlarmTriggered"] }
|
|
817
|
+
]
|
|
818
|
+
}
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
"if": {
|
|
822
|
+
"properties": {
|
|
823
|
+
"info": {
|
|
824
|
+
"properties": {
|
|
825
|
+
"type" : {
|
|
826
|
+
"const": "Valve"
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
},
|
|
832
|
+
"then": {
|
|
833
|
+
"required": ["topicGetValveActive", "topicGetValveInUse", "topicSetValveActive", "valueActive", "valueInactive", "valueInUse"]
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
]
|
|
487
837
|
},
|
|
488
838
|
"default": []
|
|
489
839
|
},
|
|
@@ -523,6 +873,26 @@
|
|
|
523
873
|
}
|
|
524
874
|
]
|
|
525
875
|
},
|
|
876
|
+
{
|
|
877
|
+
"type": "fieldset",
|
|
878
|
+
"notitle": true,
|
|
879
|
+
"condition": {
|
|
880
|
+
"functionBody": "return model.accessories?.[arguments[1]]?.info?.type === 'Valve';"
|
|
881
|
+
},
|
|
882
|
+
"items": [
|
|
883
|
+
{
|
|
884
|
+
"type": "div",
|
|
885
|
+
"displayFlex": true,
|
|
886
|
+
"flex-direction": "row",
|
|
887
|
+
"items": [
|
|
888
|
+
{
|
|
889
|
+
"key": "accessories[].valveType",
|
|
890
|
+
"flex": "0 0 33%"
|
|
891
|
+
}
|
|
892
|
+
]
|
|
893
|
+
}
|
|
894
|
+
]
|
|
895
|
+
},
|
|
526
896
|
"accessories[].mqtt.broker",
|
|
527
897
|
{
|
|
528
898
|
"type": "div",
|
|
@@ -584,6 +954,93 @@
|
|
|
584
954
|
}
|
|
585
955
|
]
|
|
586
956
|
},
|
|
957
|
+
{
|
|
958
|
+
"type": "fieldset",
|
|
959
|
+
"notitle": true,
|
|
960
|
+
"condition": {
|
|
961
|
+
"functionBody": "return model.accessories?.[arguments[1]]?.info?.type === 'Valve';"
|
|
962
|
+
},
|
|
963
|
+
"items": [
|
|
964
|
+
{
|
|
965
|
+
"type": "div",
|
|
966
|
+
"displayFlex": true,
|
|
967
|
+
"flex-direction": "row",
|
|
968
|
+
"items": [
|
|
969
|
+
{
|
|
970
|
+
"key": "accessories[].topicGetValveActive",
|
|
971
|
+
"flex": "0 0 50%"
|
|
972
|
+
},
|
|
973
|
+
{
|
|
974
|
+
"key": "accessories[].topicSetValveActive",
|
|
975
|
+
"flex": "0 0 50%"
|
|
976
|
+
}
|
|
977
|
+
]
|
|
978
|
+
},
|
|
979
|
+
{
|
|
980
|
+
"type": "div",
|
|
981
|
+
"displayFlex": true,
|
|
982
|
+
"flex-direction": "row",
|
|
983
|
+
"items": [
|
|
984
|
+
{
|
|
985
|
+
"key": "accessories[].topicGetValveInUse",
|
|
986
|
+
"flex": "0 0 50%"
|
|
987
|
+
}
|
|
988
|
+
]
|
|
989
|
+
},
|
|
990
|
+
{
|
|
991
|
+
"type": "div",
|
|
992
|
+
"displayFlex": true,
|
|
993
|
+
"flex-direction": "row",
|
|
994
|
+
"items": [
|
|
995
|
+
{
|
|
996
|
+
"key": "accessories[].topicGetValveIsConfigured",
|
|
997
|
+
"flex": "0 0 50%"
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
"key": "accessories[].topicSetValveIsConfigured",
|
|
1001
|
+
"flex": "0 0 50%"
|
|
1002
|
+
}
|
|
1003
|
+
]
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
"type": "div",
|
|
1007
|
+
"displayFlex": true,
|
|
1008
|
+
"flex-direction": "row",
|
|
1009
|
+
"items": [
|
|
1010
|
+
{
|
|
1011
|
+
"key": "accessories[].topicGetValveSetDuration",
|
|
1012
|
+
"flex": "0 0 50%"
|
|
1013
|
+
},
|
|
1014
|
+
{
|
|
1015
|
+
"key": "accessories[].topicSetValveSetDuration",
|
|
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[].topicGetValveRemainingDuration",
|
|
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[].topicGetStatusFault",
|
|
1038
|
+
"flex": "0 0 50%"
|
|
1039
|
+
}
|
|
1040
|
+
]
|
|
1041
|
+
}
|
|
1042
|
+
]
|
|
1043
|
+
},
|
|
587
1044
|
{
|
|
588
1045
|
"type": "fieldset",
|
|
589
1046
|
"notitle": true,
|
|
@@ -849,7 +1306,6 @@
|
|
|
849
1306
|
},
|
|
850
1307
|
{
|
|
851
1308
|
"key": "accessories[].temperatureUnits",
|
|
852
|
-
"title": "${config.title.sourceUnits}",
|
|
853
1309
|
"flex": "0 0 25%"
|
|
854
1310
|
}
|
|
855
1311
|
]
|
|
@@ -860,11 +1316,11 @@
|
|
|
860
1316
|
"flex-direction": "row",
|
|
861
1317
|
"items": [
|
|
862
1318
|
{
|
|
863
|
-
"key": "accessories[].
|
|
1319
|
+
"key": "accessories[].topicGetHeaterCoolerActive",
|
|
864
1320
|
"flex": "0 0 50%"
|
|
865
1321
|
},
|
|
866
1322
|
{
|
|
867
|
-
"key": "accessories[].
|
|
1323
|
+
"key": "accessories[].topicSetHeaterCoolerActive",
|
|
868
1324
|
"flex": "0 0 50%"
|
|
869
1325
|
}
|
|
870
1326
|
]
|
|
@@ -1070,7 +1526,6 @@
|
|
|
1070
1526
|
},
|
|
1071
1527
|
{
|
|
1072
1528
|
"key": "accessories[].temperatureUnits",
|
|
1073
|
-
"title": "${config.title.sourceUnits}",
|
|
1074
1529
|
"flex": "0 0 33%"
|
|
1075
1530
|
}
|
|
1076
1531
|
]
|
|
@@ -1119,7 +1574,6 @@
|
|
|
1119
1574
|
},
|
|
1120
1575
|
{
|
|
1121
1576
|
"key": "accessories[].temperatureUnits",
|
|
1122
|
-
"title": "${config.title.sourceUnits}",
|
|
1123
1577
|
"flex": "0 0 25%"
|
|
1124
1578
|
}
|
|
1125
1579
|
]
|
|
@@ -1347,6 +1801,53 @@
|
|
|
1347
1801
|
}
|
|
1348
1802
|
]
|
|
1349
1803
|
},
|
|
1804
|
+
{
|
|
1805
|
+
"type": "fieldset",
|
|
1806
|
+
"notitle": true,
|
|
1807
|
+
"condition": {
|
|
1808
|
+
"functionBody": "return model.accessories?.[arguments[1]]?.info?.type === 'Valve';"
|
|
1809
|
+
},
|
|
1810
|
+
"items": [
|
|
1811
|
+
{
|
|
1812
|
+
"type": "div",
|
|
1813
|
+
"displayFlex": true,
|
|
1814
|
+
"flex-direction": "row",
|
|
1815
|
+
"items": [
|
|
1816
|
+
{
|
|
1817
|
+
"key": "accessories[].valueActive",
|
|
1818
|
+
"flex": "0 0 25%"
|
|
1819
|
+
},
|
|
1820
|
+
{
|
|
1821
|
+
"key": "accessories[].valueInactive",
|
|
1822
|
+
"flex": "0 0 25%"
|
|
1823
|
+
},
|
|
1824
|
+
{
|
|
1825
|
+
"key": "accessories[].valueInUse",
|
|
1826
|
+
"flex": "0 0 25%"
|
|
1827
|
+
}
|
|
1828
|
+
]
|
|
1829
|
+
},
|
|
1830
|
+
{
|
|
1831
|
+
"type": "div",
|
|
1832
|
+
"displayFlex": true,
|
|
1833
|
+
"flex-direction": "row",
|
|
1834
|
+
"items": [
|
|
1835
|
+
{
|
|
1836
|
+
"key": "accessories[].valueConfigured",
|
|
1837
|
+
"flex": "0 0 25%"
|
|
1838
|
+
},
|
|
1839
|
+
{
|
|
1840
|
+
"key": "accessories[].valueNotConfigured",
|
|
1841
|
+
"flex": "0 0 25%"
|
|
1842
|
+
},
|
|
1843
|
+
{
|
|
1844
|
+
"key": "accessories[].valueFault",
|
|
1845
|
+
"flex": "0 0 25%"
|
|
1846
|
+
}
|
|
1847
|
+
]
|
|
1848
|
+
}
|
|
1849
|
+
]
|
|
1850
|
+
},
|
|
1350
1851
|
{
|
|
1351
1852
|
"type": "div",
|
|
1352
1853
|
"displayFlex": true,
|
|
@@ -17,6 +17,7 @@ import { MotionSensorAccessory } from '../sensor/motion.js';
|
|
|
17
17
|
import { OccupancySensorAccessory } from '../sensor/occupancy.js';
|
|
18
18
|
import { SmokeSensorAccessory } from '../sensor/smoke.js';
|
|
19
19
|
import { TemperatureSensorAccessory } from '../sensor/temperature.js';
|
|
20
|
+
import { ValveAccessory } from '../valve.js';
|
|
20
21
|
export function createAccessory(Service, Characteristic, platformAccessory, accessoryConfig, log, isGrouped = false) {
|
|
21
22
|
switch (accessoryConfig.info.type) {
|
|
22
23
|
case AccessoryType.CarbonDioxideSensor:
|
|
@@ -53,6 +54,8 @@ export function createAccessory(Service, Characteristic, platformAccessory, acce
|
|
|
53
54
|
return new TemperatureSensorAccessory(Service, Characteristic, platformAccessory, accessoryConfig, log, isGrouped);
|
|
54
55
|
case AccessoryType.Thermostat:
|
|
55
56
|
return new ThermostatAccessory(Service, Characteristic, platformAccessory, accessoryConfig, log, isGrouped);
|
|
57
|
+
case AccessoryType.Valve:
|
|
58
|
+
return new ValveAccessory(Service, Characteristic, platformAccessory, accessoryConfig, log, isGrouped);
|
|
56
59
|
}
|
|
57
60
|
log.error(strings.startup.unsupportedType, accessoryConfig.info.type);
|
|
58
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/accessory/abstract/helper.ts"],"names":[],"mapp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