homebridge-easy-mqtt 1.4.0-beta.1 → 1.4.0-beta.10

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.
Files changed (66) hide show
  1. package/CHANGELOG.md +10 -2
  2. package/README.md +170 -25
  3. package/config.schema.json +985 -38
  4. package/dist/accessory/abstract/base.js +1 -1
  5. package/dist/accessory/abstract/base.js.map +1 -1
  6. package/dist/accessory/abstract/common.d.ts +38 -0
  7. package/dist/accessory/abstract/common.js +159 -0
  8. package/dist/accessory/abstract/common.js.map +1 -0
  9. package/dist/accessory/abstract/helper.js +9 -0
  10. package/dist/accessory/abstract/helper.js.map +1 -1
  11. package/dist/accessory/abstract/mqtt.d.ts +6 -24
  12. package/dist/accessory/abstract/mqtt.js +13 -148
  13. package/dist/accessory/abstract/mqtt.js.map +1 -1
  14. package/dist/accessory/addons/addon.d.ts +12 -0
  15. package/dist/accessory/addons/addon.js +23 -0
  16. package/dist/accessory/addons/addon.js.map +1 -0
  17. package/dist/accessory/addons/filter.d.ts +11 -0
  18. package/dist/accessory/addons/filter.js +36 -0
  19. package/dist/accessory/addons/filter.js.map +1 -0
  20. package/dist/accessory/climate/active.d.ts +11 -0
  21. package/dist/accessory/climate/active.js +44 -0
  22. package/dist/accessory/climate/active.js.map +1 -0
  23. package/dist/accessory/climate/heaterCooler.d.ts +2 -6
  24. package/dist/accessory/climate/heaterCooler.js +5 -37
  25. package/dist/accessory/climate/heaterCooler.js.map +1 -1
  26. package/dist/accessory/climate/purifier.d.ts +19 -0
  27. package/dist/accessory/climate/purifier.js +114 -0
  28. package/dist/accessory/climate/purifier.js.map +1 -0
  29. package/dist/accessory/climate/{climate.d.ts → temperatureControl.d.ts} +3 -2
  30. package/dist/accessory/climate/{climate.js → temperatureControl.js} +7 -5
  31. package/dist/accessory/climate/temperatureControl.js.map +1 -0
  32. package/dist/accessory/climate/thermostat.d.ts +2 -2
  33. package/dist/accessory/climate/thermostat.js +5 -2
  34. package/dist/accessory/climate/thermostat.js.map +1 -1
  35. package/dist/accessory/sensor/light.d.ts +9 -0
  36. package/dist/accessory/sensor/light.js +13 -0
  37. package/dist/accessory/sensor/light.js.map +1 -0
  38. package/dist/accessory/sensor/sensor.js +2 -2
  39. package/dist/accessory/sensor/sensor.js.map +1 -1
  40. package/dist/accessory/valve.d.ts +14 -0
  41. package/dist/accessory/valve.js +71 -0
  42. package/dist/accessory/valve.js.map +1 -0
  43. package/dist/homebridge/platform.js +1 -1
  44. package/dist/homebridge/platform.js.map +1 -1
  45. package/dist/homebridge-ui/public/index.html +1 -1
  46. package/dist/homebridge-ui/public/ui.js +1 -1
  47. package/dist/i18n/en.d.ts +72 -0
  48. package/dist/i18n/en.js +72 -0
  49. package/dist/i18n/en.js.map +1 -1
  50. package/dist/i18n/fr.d.ts +72 -0
  51. package/dist/i18n/i18n.d.ts +74 -1
  52. package/dist/i18n/i18n.js +6 -0
  53. package/dist/i18n/i18n.js.map +1 -1
  54. package/dist/i18n/ro.d.ts +758 -0
  55. package/dist/i18n/ro.js +381 -0
  56. package/dist/i18n/ro.js.map +1 -0
  57. package/dist/i18n/template.d.ts +72 -0
  58. package/dist/model/enums.d.ts +25 -2
  59. package/dist/model/enums.js +25 -0
  60. package/dist/model/enums.js.map +1 -1
  61. package/dist/model/mqtt.d.ts +5 -4
  62. package/dist/model/mqtt.js +38 -22
  63. package/dist/model/mqtt.js.map +1 -1
  64. package/dist/model/types.d.ts +69 -23
  65. package/package.json +1 -1
  66. package/dist/accessory/climate/climate.js.map +0 -1
@@ -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", "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.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": {
@@ -53,8 +53,9 @@
53
53
  "broker": {
54
54
  "type": "string",
55
55
  "title": "${config.title.broker}",
56
+ "description": "${config.description.broker}",
56
57
  "placeholder": "mqtts://192.168.0.1:1883",
57
- "required": true
58
+ "pattern": "^(https?|mqtts?|wss?|ftp):\\/\\/([\\w.-]+)(:\\d+)?(\\/.*)?$"
58
59
  },
59
60
  "username": {
60
61
  "type": "string",
@@ -68,7 +69,22 @@
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*)?\\}$"
74
+ },
75
+ "onConnect": {
76
+ "type": "array",
77
+ "items": {
78
+ "type": "object",
79
+ "properties": {
80
+ "topic": {
81
+ "type": "string"
82
+ },
83
+ "message": {
84
+ "type": "string"
85
+ }
86
+ }
87
+ }
72
88
  }
73
89
  }
74
90
  },
@@ -108,9 +124,16 @@
108
124
  },
109
125
  "temperatureUnits": {
110
126
  "type": "string",
127
+ "title": "${config.title.sourceUnits}",
111
128
  "enum": ["C", "F"],
112
129
  "enumNames": ["${config.enumNames.celsius}", "${config.enumNames.fahrenheit}"]
113
130
  },
131
+ "valveType": {
132
+ "type": "string",
133
+ "title": "${config.title.valveType}",
134
+ "enum": ["GENERIC_VALVE", "IRRIGATION", "SHOWER_HEAD", "WATER_FAUCET"],
135
+ "enumNames": ["${config.enumNames.valveGeneric}", "${config.enumNames.valveIrrigation}", "${config.enumNames.valveShower}", "${config.enumNames.valveFaucet}"]
136
+ },
114
137
  "topicGetBatteryLevel": {
115
138
  "type": "string",
116
139
  "title": "${config.title.topicGetBatteryLevel}"
@@ -235,6 +258,10 @@
235
258
  "type": "string",
236
259
  "title": "${config.title.topicGetLeakDetected}"
237
260
  },
261
+ "topicGetCurrentAmbientLightLevel": {
262
+ "type": "string",
263
+ "title": "${config.title.topicGetCurrentAmbientLightLevel}"
264
+ },
238
265
  "topicGetMotionDetected": {
239
266
  "type": "string",
240
267
  "title": "${config.title.topicGetMotionDetected}"
@@ -339,6 +366,62 @@
339
366
  "type": "string",
340
367
  "title": "${config.title.topicSetTargetHeaterCoolerState}"
341
368
  },
369
+ "topicGetValveActive": {
370
+ "type": "string",
371
+ "title": "${config.title.topicGetValveActive}"
372
+ },
373
+ "topicSetValveActive": {
374
+ "type": "string",
375
+ "title": "${config.title.topicSetValveActive}"
376
+ },
377
+ "topicGetValveInUse": {
378
+ "type": "string",
379
+ "title": "${config.title.topicGetValveInUse}"
380
+ },
381
+ "topicGetValveIsConfigured": {
382
+ "type": "string",
383
+ "title": "${config.title.topicGetValveIsConfigured}"
384
+ },
385
+ "topicSetValveIsConfigured": {
386
+ "type": "string",
387
+ "title": "${config.title.topicSetValveIsConfigured}"
388
+ },
389
+ "topicGetValveRemainingDuration": {
390
+ "type": "string",
391
+ "title": "${config.title.topicGetValveRemainingDuration}"
392
+ },
393
+ "topicGetValveSetDuration": {
394
+ "type": "string",
395
+ "title": "${config.title.topicGetValveSetDuration}"
396
+ },
397
+ "topicSetValveSetDuration": {
398
+ "type": "string",
399
+ "title": "${config.title.topicSetValveSetDuration}"
400
+ },
401
+ "topicGetCurrentPurifierState": {
402
+ "type": "string",
403
+ "title": "${config.title.topicGetCurrentPurifierState}"
404
+ },
405
+ "topicGetTargetPurifierState": {
406
+ "type": "string",
407
+ "title": "${config.title.topicGetTargetPurifierState}"
408
+ },
409
+ "topicSetTargetPurifierState": {
410
+ "type": "string",
411
+ "title": "${config.title.topicSetTargetPurifierState}"
412
+ },
413
+ "topicGetFilterChangeIndication": {
414
+ "type": "string",
415
+ "title": "${config.title.topicGetFilterChangeIndication}"
416
+ },
417
+ "topicGetFilterLifeLevel": {
418
+ "type": "string",
419
+ "title": "${config.title.topicGetFilterLifeLevel}"
420
+ },
421
+ "topicResetFilterIndication": {
422
+ "type": "string",
423
+ "title": "${config.title.topicResetFilterIndication}"
424
+ },
342
425
  "valueBatteryLow": {
343
426
  "type": "string",
344
427
  "title": "${config.title.valueBatteryLow}"
@@ -475,11 +558,564 @@
475
558
  "type": "string",
476
559
  "title": "${config.title.valueSwingDisabled}"
477
560
  },
561
+ "valueActive": {
562
+ "type": "string",
563
+ "title": "${config.title.valueActive}"
564
+ },
565
+ "valueConfigured": {
566
+ "type": "string",
567
+ "title": "${config.title.valueConfigured}"
568
+ },
569
+ "valueNotConfigured": {
570
+ "type": "string",
571
+ "title": "${config.title.valueNotConfigured}"
572
+ },
573
+ "valueInUse": {
574
+ "type": "string",
575
+ "title": "${config.title.valueInUse}"
576
+ },
577
+ "valueInactive": {
578
+ "type": "string",
579
+ "title": "${config.title.valueInactive}"
580
+ },
581
+ "valueModeManual": {
582
+ "type": "string",
583
+ "title": "${config.title.valueModeManual}"
584
+ },
585
+ "valueModePurifying": {
586
+ "type": "string",
587
+ "title": "${config.title.valueModePurifying}"
588
+ },
589
+ "valueFilterChange": {
590
+ "type": "string",
591
+ "title": "${config.title.valueFilterChange}"
592
+ },
593
+ "valueFilterReset": {
594
+ "type": "string",
595
+ "title": "${config.title.valueFilterReset}"
596
+ },
478
597
  "disableLogging": {
479
598
  "type": "boolean",
480
599
  "title": "${config.title.disableLogging}"
481
600
  }
482
- }
601
+ },
602
+ "allOf": [
603
+ {
604
+ "if": {
605
+ "properties": {
606
+ "info": {
607
+ "properties": {
608
+ "type" : {
609
+ "enum": ["Lightbulb", "Outlet", "Switch"]
610
+ }
611
+ }
612
+ }
613
+ }
614
+ },
615
+ "then": {
616
+ "required": ["topicGetOn", "topicSetOn", "valueOn", "valueOff"]
617
+ }
618
+ },
619
+ {
620
+ "if": {
621
+ "properties": {
622
+ "info": {
623
+ "properties": {
624
+ "type" : {
625
+ "const": "CarbonDioxideSensor"
626
+ }
627
+ }
628
+ }
629
+ }
630
+ },
631
+ "then": {
632
+ "required": ["topicGetCarbonDioxideDetected", "valueCarbonDioxideDetected"]
633
+ }
634
+ },
635
+ {
636
+ "if": {
637
+ "properties": {
638
+ "info": {
639
+ "properties": {
640
+ "type" : {
641
+ "const": "CarbonMonoxideSensor"
642
+ }
643
+ }
644
+ }
645
+ }
646
+ },
647
+ "then": {
648
+ "required": ["topicGetCarbonMonoxideDetected", "valueCarbonMonoxideDetected"]
649
+ }
650
+ },
651
+ {
652
+ "if": {
653
+ "properties": {
654
+ "info": {
655
+ "properties": {
656
+ "type" : {
657
+ "const": "ContactSensor"
658
+ }
659
+ }
660
+ }
661
+ }
662
+ },
663
+ "then": {
664
+ "required": ["topicGetContactSensorState", "valueContactDetected"]
665
+ }
666
+ },
667
+ {
668
+ "if": {
669
+ "properties": {
670
+ "info": {
671
+ "properties": {
672
+ "type" : {
673
+ "const": "HumiditySensor"
674
+ }
675
+ }
676
+ }
677
+ }
678
+ },
679
+ "then": {
680
+ "required": ["topicGetCurrentRelativeHumidity"]
681
+ }
682
+ },
683
+ {
684
+ "if": {
685
+ "properties": {
686
+ "info": {
687
+ "properties": {
688
+ "type" : {
689
+ "const": "LeakSensor"
690
+ }
691
+ }
692
+ }
693
+ }
694
+ },
695
+ "then": {
696
+ "required": ["topicGetLeakDetected", "valueLeakDetected"]
697
+ }
698
+ },
699
+ {
700
+ "if": {
701
+ "properties": {
702
+ "info": {
703
+ "properties": {
704
+ "type" : {
705
+ "const": "LightSensor"
706
+ }
707
+ }
708
+ }
709
+ }
710
+ },
711
+ "then": {
712
+ "required": ["topicGetCurrentAmbientLightLevel"]
713
+ }
714
+ },
715
+ {
716
+ "if": {
717
+ "properties": {
718
+ "info": {
719
+ "properties": {
720
+ "type" : {
721
+ "const": "MotionSensor"
722
+ }
723
+ }
724
+ }
725
+ }
726
+ },
727
+ "then": {
728
+ "required": ["topicGetMotionDetected", "valueMotionDetected"]
729
+ }
730
+ },
731
+ {
732
+ "if": {
733
+ "properties": {
734
+ "info": {
735
+ "properties": {
736
+ "type" : {
737
+ "const": "OccupancySensor"
738
+ }
739
+ }
740
+ }
741
+ }
742
+ },
743
+ "then": {
744
+ "required": ["topicGetOccupancyDetected", "valueOccupancyDetected"]
745
+ }
746
+ },
747
+ {
748
+ "if": {
749
+ "properties": {
750
+ "info": {
751
+ "properties": {
752
+ "type" : {
753
+ "const": "SmokeSensor"
754
+ }
755
+ }
756
+ }
757
+ }
758
+ },
759
+ "then": {
760
+ "required": ["topicGetSmokeDetected", "valueSmokeDetected"]
761
+ }
762
+ },
763
+ {
764
+ "if": {
765
+ "properties": {
766
+ "info": {
767
+ "properties": {
768
+ "type" : {
769
+ "const": "TemperatureSensor"
770
+ }
771
+ }
772
+ }
773
+ }
774
+ },
775
+ "then": {
776
+ "required": ["topicGetCurrentTemperature"]
777
+ }
778
+ },
779
+ {
780
+ "if": {
781
+ "properties": {
782
+ "info": {
783
+ "properties": {
784
+ "type" : {
785
+ "const": "AirPurifier"
786
+ }
787
+ }
788
+ }
789
+ }
790
+ },
791
+ "then": {
792
+ "required": ["topicGetActive", "topicSetActive", "topicGetCurrentPurifierState", "topicGetTargetPurifierState", "topicSetTargetPurifierState", "valueStateActive", "valueStateInactive"],
793
+ "anyOf": [
794
+ { "required": ["valueModeIdle"] },
795
+ { "required": ["valueModeInactive"] },
796
+ { "required": ["valueModePurifying"] }
797
+ ]
798
+ }
799
+ },
800
+ {
801
+ "if": {
802
+ "properties": {
803
+ "info": {
804
+ "properties": {
805
+ "type" : {
806
+ "const": "AirPurifier"
807
+ }
808
+ }
809
+ }
810
+ }
811
+ },
812
+ "then": {
813
+ "anyOf": [
814
+ { "required": ["valueModeAuto"] },
815
+ { "required": ["valueModeManual"] }
816
+ ]
817
+ }
818
+ },
819
+ {
820
+ "if": {
821
+ "properties": {
822
+ "info": {
823
+ "properties": {
824
+ "type" : {
825
+ "const": "HeaterCooler"
826
+ }
827
+ }
828
+ }
829
+ }
830
+ },
831
+ "then": {
832
+ "required": ["topicGetActive", "topicSetActive", "topicGetCurrentHeaterCoolerState", "topicGetCurrentTemperature", "topicGetTargetHeaterCoolerState", "topicSetTargetHeaterCoolerState", "valueStateActive", "valueStateInactive"],
833
+ "anyOf": [
834
+ { "required": ["valueModeCool"] },
835
+ { "required": ["valueModeHeat"] },
836
+ { "required": ["valueModeIdle"] },
837
+ { "required": ["valueModeInactive"] }
838
+ ]
839
+ }
840
+ },
841
+ {
842
+ "if": {
843
+ "properties": {
844
+ "info": {
845
+ "properties": {
846
+ "type" : {
847
+ "const": "HeaterCooler"
848
+ }
849
+ }
850
+ }
851
+ }
852
+ },
853
+ "then": {
854
+ "anyOf": [
855
+ { "required": ["valueModeAuto"] },
856
+ { "required": ["valueModeHeat"] },
857
+ { "required": ["valueModeCool"] }
858
+ ]
859
+ }
860
+ },
861
+ {
862
+ "if": {
863
+ "properties": {
864
+ "info": {
865
+ "properties": {
866
+ "type" : {
867
+ "const": "Thermostat"
868
+ }
869
+ }
870
+ }
871
+ }
872
+ },
873
+ "then": {
874
+ "required": ["topicGetCurrentHeatingCoolingState", "topicGetTargetHeatingCoolingState", "topicSetTargetHeatingCoolingState", "topicGetCurrentTemperature", "topicGetTargetTemperature", "topicSetTargetTemperature"],
875
+ "anyOf": [
876
+ { "required": ["valueModeCool"] },
877
+ { "required": ["valueModeHeat"] },
878
+ { "required": ["valueModeOff"] }
879
+ ]
880
+ }
881
+ },
882
+ {
883
+ "if": {
884
+ "properties": {
885
+ "info": {
886
+ "properties": {
887
+ "type" : {
888
+ "const": "LockMechanism"
889
+ }
890
+ }
891
+ }
892
+ }
893
+ },
894
+ "then": {
895
+ "required": ["topicGetCurrentLockState", "topicGetTargetLockState", "topicSetTargetLockState", "valueLockStateSecured", "valueLockStateUnsecured"]
896
+ }
897
+ },
898
+ {
899
+ "if": {
900
+ "properties": {
901
+ "info": {
902
+ "properties": {
903
+ "type" : {
904
+ "const": "SecuritySystem"
905
+ }
906
+ }
907
+ }
908
+ }
909
+ },
910
+ "then": {
911
+ "required": ["topicGetCurrentSecurityState", "topicGetTargetSecurityState", "topicSetTargetSecurityState"],
912
+ "anyOf": [
913
+ { "required": ["valueArmStay"] },
914
+ { "required": ["valueArmAway"] },
915
+ { "required": ["valueArmNight"] },
916
+ { "required": ["valueDisarm"] }
917
+ ]
918
+ }
919
+ },
920
+ {
921
+ "if": {
922
+ "properties": {
923
+ "info": {
924
+ "properties": {
925
+ "type" : {
926
+ "const": "Valve"
927
+ }
928
+ }
929
+ }
930
+ }
931
+ },
932
+ "then": {
933
+ "required": ["topicGetValveActive", "topicGetValveInUse", "topicSetValveActive", "valueActive", "valueInactive", "valueInUse"]
934
+ }
935
+ },
936
+ {
937
+ "if": {
938
+ "properties": {
939
+ "topicGetLockPhysicalControls": {
940
+ "minLength": 1
941
+ }
942
+ },
943
+ "required": ["topicGetLockPhysicalControls"]
944
+ },
945
+ "then": {
946
+ "required": ["valueControlLock"]
947
+ }
948
+ },
949
+ {
950
+ "if": {
951
+ "properties": {
952
+ "topicSetLockPhysicalControls": {
953
+ "minLength": 1
954
+ }
955
+ },
956
+ "required": ["topicSetLockPhysicalControls"]
957
+ },
958
+ "then": {
959
+ "required": ["valueControlLock", "valueControlUnlock"]
960
+ }
961
+ },
962
+ {
963
+ "if": {
964
+ "properties": {
965
+ "topicGetSwingMode": {
966
+ "minLength": 1
967
+ }
968
+ },
969
+ "required": ["topicGetSwingMode"]
970
+ },
971
+ "then": {
972
+ "required": ["valueSwingEnabled"]
973
+ }
974
+ },
975
+ {
976
+ "if": {
977
+ "properties": {
978
+ "topicSetSwingMode": {
979
+ "minLength": 1
980
+ }
981
+ },
982
+ "required": ["topicSetSwingMode"]
983
+ },
984
+ "then": {
985
+ "required": ["valueSwingEnabled", "valueSwingDisabled"]
986
+ }
987
+ },
988
+ {
989
+ "if": {
990
+ "properties": {
991
+ "topicGetBatteryLow": {
992
+ "minLength": 1
993
+ }
994
+ },
995
+ "required": ["topicGetBatteryLow"]
996
+ },
997
+ "then": {
998
+ "required": ["valueBatteryLow"]
999
+ }
1000
+ },
1001
+ {
1002
+ "if": {
1003
+ "properties": {
1004
+ "topicGetStatusActive": {
1005
+ "minLength": 1
1006
+ }
1007
+ },
1008
+ "required": ["topicGetStatusActive"]
1009
+ },
1010
+ "then": {
1011
+ "required": ["valueStatusActive"]
1012
+ }
1013
+ },
1014
+ {
1015
+ "if": {
1016
+ "properties": {
1017
+ "topicGetStatusFault": {
1018
+ "minLength": 1
1019
+ }
1020
+ },
1021
+ "required": ["topicGetStatusFault"]
1022
+ },
1023
+ "then": {
1024
+ "required": ["valueFault"]
1025
+ }
1026
+ },
1027
+ {
1028
+ "if": {
1029
+ "properties": {
1030
+ "topicGetStatusTampered": {
1031
+ "minLength": 1
1032
+ }
1033
+ },
1034
+ "required": ["topicGetStatusTampered"]
1035
+ },
1036
+ "then": {
1037
+ "required": ["valueTampered"]
1038
+ }
1039
+ },
1040
+ {
1041
+ "if": {
1042
+ "properties": {
1043
+ "topicGetOutletInUse": {
1044
+ "minLength": 1
1045
+ }
1046
+ },
1047
+ "required": ["topicGetOutletInUse"]
1048
+ },
1049
+ "then": {
1050
+ "required": ["valueOutletInUse"]
1051
+ }
1052
+ },
1053
+ {
1054
+ "if": {
1055
+ "properties": {
1056
+ "topicGetValveIsConfigured": {
1057
+ "minLength": 1
1058
+ }
1059
+ },
1060
+ "required": ["topicGetValveIsConfigured"]
1061
+ },
1062
+ "then": {
1063
+ "required": ["valueConfigured"]
1064
+ }
1065
+ },
1066
+ {
1067
+ "if": {
1068
+ "properties": {
1069
+ "topicSetValveIsConfigured": {
1070
+ "minLength": 1
1071
+ }
1072
+ },
1073
+ "required": ["topicSetValveIsConfigured"]
1074
+ },
1075
+ "then": {
1076
+ "required": ["valueConfigured", "valueNotConfigured"]
1077
+ }
1078
+ },
1079
+ {
1080
+ "if": {
1081
+ "properties": {
1082
+ "topicGetFilterChangeIndication": {
1083
+ "minLength": 1
1084
+ }
1085
+ },
1086
+ "required": ["topicGetFilterChangeIndication"]
1087
+ },
1088
+ "then": {
1089
+ "required": ["valueFilterChange"]
1090
+ }
1091
+ },
1092
+ {
1093
+ "if": {
1094
+ "properties": {
1095
+ "topicGetFilterLifeLevel": {
1096
+ "minLength": 1
1097
+ }
1098
+ },
1099
+ "required": ["topicGetFilterLifeLevel"]
1100
+ },
1101
+ "then": {
1102
+ "required": ["topicGetFilterChangeIndication"]
1103
+ }
1104
+ },
1105
+ {
1106
+ "if": {
1107
+ "properties": {
1108
+ "topicResetFilterIndication": {
1109
+ "minLength": 1
1110
+ }
1111
+ },
1112
+ "required": ["topicResetFilterIndication"]
1113
+ },
1114
+ "then": {
1115
+ "required": ["topicGetFilterChangeIndication", "valueFilterReset"]
1116
+ }
1117
+ }
1118
+ ]
483
1119
  },
484
1120
  "default": []
485
1121
  },
@@ -519,6 +1155,26 @@
519
1155
  }
520
1156
  ]
521
1157
  },
1158
+ {
1159
+ "type": "fieldset",
1160
+ "notitle": true,
1161
+ "condition": {
1162
+ "functionBody": "return model.accessories?.[arguments[1]]?.info?.type === 'Valve';"
1163
+ },
1164
+ "items": [
1165
+ {
1166
+ "type": "div",
1167
+ "displayFlex": true,
1168
+ "flex-direction": "row",
1169
+ "items": [
1170
+ {
1171
+ "key": "accessories[].valveType",
1172
+ "flex": "0 0 33%"
1173
+ }
1174
+ ]
1175
+ }
1176
+ ]
1177
+ },
522
1178
  "accessories[].mqtt.broker",
523
1179
  {
524
1180
  "type": "div",
@@ -558,7 +1214,87 @@
558
1214
  "flex-direction": "row",
559
1215
  "items": [
560
1216
  {
561
- "key": "accessories[].topicGetCurrentLockState",
1217
+ "key": "accessories[].topicGetCurrentLockState",
1218
+ "flex": "0 0 50%"
1219
+ }
1220
+ ]
1221
+ },
1222
+ {
1223
+ "type": "div",
1224
+ "displayFlex": true,
1225
+ "flex-direction": "row",
1226
+ "items": [
1227
+ {
1228
+ "key": "accessories[].topicGetTargetLockState",
1229
+ "flex": "0 0 50%"
1230
+ },
1231
+ {
1232
+ "key": "accessories[].topicSetTargetLockState",
1233
+ "flex": "0 0 50%"
1234
+ }
1235
+ ]
1236
+ }
1237
+ ]
1238
+ },
1239
+ {
1240
+ "type": "fieldset",
1241
+ "notitle": true,
1242
+ "condition": {
1243
+ "functionBody": "return model.accessories?.[arguments[1]]?.info?.type === 'Valve';"
1244
+ },
1245
+ "items": [
1246
+ {
1247
+ "type": "div",
1248
+ "displayFlex": true,
1249
+ "flex-direction": "row",
1250
+ "items": [
1251
+ {
1252
+ "key": "accessories[].topicGetValveActive",
1253
+ "flex": "0 0 50%"
1254
+ },
1255
+ {
1256
+ "key": "accessories[].topicSetValveActive",
1257
+ "flex": "0 0 50%"
1258
+ }
1259
+ ]
1260
+ },
1261
+ {
1262
+ "type": "div",
1263
+ "displayFlex": true,
1264
+ "flex-direction": "row",
1265
+ "items": [
1266
+ {
1267
+ "key": "accessories[].topicGetValveInUse",
1268
+ "flex": "0 0 50%"
1269
+ }
1270
+ ]
1271
+ },
1272
+ {
1273
+ "type": "div",
1274
+ "displayFlex": true,
1275
+ "flex-direction": "row",
1276
+ "items": [
1277
+ {
1278
+ "key": "accessories[].topicGetValveIsConfigured",
1279
+ "flex": "0 0 50%"
1280
+ },
1281
+ {
1282
+ "key": "accessories[].topicSetValveIsConfigured",
1283
+ "flex": "0 0 50%"
1284
+ }
1285
+ ]
1286
+ },
1287
+ {
1288
+ "type": "div",
1289
+ "displayFlex": true,
1290
+ "flex-direction": "row",
1291
+ "items": [
1292
+ {
1293
+ "key": "accessories[].topicGetValveSetDuration",
1294
+ "flex": "0 0 50%"
1295
+ },
1296
+ {
1297
+ "key": "accessories[].topicSetValveSetDuration",
562
1298
  "flex": "0 0 50%"
563
1299
  }
564
1300
  ]
@@ -569,11 +1305,18 @@
569
1305
  "flex-direction": "row",
570
1306
  "items": [
571
1307
  {
572
- "key": "accessories[].topicGetTargetLockState",
1308
+ "key": "accessories[].topicGetValveRemainingDuration",
573
1309
  "flex": "0 0 50%"
574
- },
1310
+ }
1311
+ ]
1312
+ },
1313
+ {
1314
+ "type": "div",
1315
+ "displayFlex": true,
1316
+ "flex-direction": "row",
1317
+ "items": [
575
1318
  {
576
- "key": "accessories[].topicSetTargetLockState",
1319
+ "key": "accessories[].topicGetStatusFault",
577
1320
  "flex": "0 0 50%"
578
1321
  }
579
1322
  ]
@@ -831,7 +1574,7 @@
831
1574
  "type": "fieldset",
832
1575
  "notitle": true,
833
1576
  "condition": {
834
- "functionBody": "return model.accessories?.[arguments[1]]?.info?.type === 'HeaterCooler';"
1577
+ "functionBody": "return model.accessories?.[arguments[1]]?.info?.type === 'AirPurifier';"
835
1578
  },
836
1579
  "items": [
837
1580
  {
@@ -840,13 +1583,8 @@
840
1583
  "flex-direction": "row",
841
1584
  "items": [
842
1585
  {
843
- "key": "accessories[].topicGetCurrentTemperature",
1586
+ "key": "accessories[].topicGetCurrentPurifierState",
844
1587
  "flex": "0 0 50%"
845
- },
846
- {
847
- "key": "accessories[].temperatureUnits",
848
- "title": "${config.title.sourceUnits}",
849
- "flex": "0 0 25%"
850
1588
  }
851
1589
  ]
852
1590
  },
@@ -856,23 +1594,36 @@
856
1594
  "flex-direction": "row",
857
1595
  "items": [
858
1596
  {
859
- "key": "accessories[].topicGetActive",
1597
+ "key": "accessories[].topicGetTargetPurifierState",
860
1598
  "flex": "0 0 50%"
861
1599
  },
862
1600
  {
863
- "key": "accessories[].topicSetActive",
1601
+ "key": "accessories[].topicSetTargetPurifierState",
864
1602
  "flex": "0 0 50%"
865
1603
  }
866
1604
  ]
867
- },
1605
+ }
1606
+ ]
1607
+ },
1608
+ {
1609
+ "type": "fieldset",
1610
+ "notitle": true,
1611
+ "condition": {
1612
+ "functionBody": "return model.accessories?.[arguments[1]]?.info?.type === 'HeaterCooler';"
1613
+ },
1614
+ "items": [
868
1615
  {
869
1616
  "type": "div",
870
1617
  "displayFlex": true,
871
1618
  "flex-direction": "row",
872
1619
  "items": [
873
1620
  {
874
- "key": "accessories[].topicGetCurrentHeaterCoolerState",
1621
+ "key": "accessories[].topicGetCurrentTemperature",
875
1622
  "flex": "0 0 50%"
1623
+ },
1624
+ {
1625
+ "key": "accessories[].temperatureUnits",
1626
+ "flex": "0 0 25%"
876
1627
  }
877
1628
  ]
878
1629
  },
@@ -882,11 +1633,7 @@
882
1633
  "flex-direction": "row",
883
1634
  "items": [
884
1635
  {
885
- "key": "accessories[].topicGetTargetHeaterCoolerState",
886
- "flex": "0 0 50%"
887
- },
888
- {
889
- "key": "accessories[].topicSetTargetHeaterCoolerState",
1636
+ "key": "accessories[].topicGetCurrentHeaterCoolerState",
890
1637
  "flex": "0 0 50%"
891
1638
  }
892
1639
  ]
@@ -897,30 +1644,48 @@
897
1644
  "flex-direction": "row",
898
1645
  "items": [
899
1646
  {
900
- "key": "accessories[].topicGetCoolingThresholdTemperature",
1647
+ "key": "accessories[].topicGetTargetHeaterCoolerState",
901
1648
  "flex": "0 0 50%"
902
1649
  },
903
1650
  {
904
- "key": "accessories[].topicSetCoolingThresholdTemperature",
1651
+ "key": "accessories[].topicSetTargetHeaterCoolerState",
905
1652
  "flex": "0 0 50%"
906
1653
  }
907
1654
  ]
908
- },
1655
+ }
1656
+ ]
1657
+ },
1658
+ {
1659
+ "type": "fieldset",
1660
+ "notitle": true,
1661
+ "condition": {
1662
+ "functionBody": "return ['AirPurifier', 'HeaterCooler'].includes(model.accessories?.[arguments[1]]?.info?.type);"
1663
+ },
1664
+ "items": [
909
1665
  {
910
1666
  "type": "div",
911
1667
  "displayFlex": true,
912
1668
  "flex-direction": "row",
913
1669
  "items": [
914
1670
  {
915
- "key": "accessories[].topicGetHeatingThresholdTemperature",
1671
+ "key": "accessories[].topicGetActive",
916
1672
  "flex": "0 0 50%"
917
1673
  },
918
1674
  {
919
- "key": "accessories[].topicSetHeatingThresholdTemperature",
1675
+ "key": "accessories[].topicSetActive",
920
1676
  "flex": "0 0 50%"
921
1677
  }
922
1678
  ]
923
- },
1679
+ }
1680
+ ]
1681
+ },
1682
+ {
1683
+ "type": "fieldset",
1684
+ "notitle": true,
1685
+ "condition": {
1686
+ "functionBody": "return ['AirPurifier', 'HeaterCooler'].includes(model.accessories?.[arguments[1]]?.info?.type);"
1687
+ },
1688
+ "items": [
924
1689
  {
925
1690
  "type": "div",
926
1691
  "displayFlex": true,
@@ -996,6 +1761,20 @@
996
1761
  }
997
1762
  ]
998
1763
  },
1764
+ {
1765
+ "type": "div",
1766
+ "displayFlex": true,
1767
+ "flex-direction": "row",
1768
+ "condition": {
1769
+ "functionBody": "return model.accessories?.[arguments[1]]?.info?.type === 'LightSensor';"
1770
+ },
1771
+ "items": [
1772
+ {
1773
+ "key": "accessories[].topicGetCurrentAmbientLightLevel",
1774
+ "flex": "0 0 50%"
1775
+ }
1776
+ ]
1777
+ },
999
1778
  {
1000
1779
  "type": "div",
1001
1780
  "displayFlex": true,
@@ -1052,7 +1831,6 @@
1052
1831
  },
1053
1832
  {
1054
1833
  "key": "accessories[].temperatureUnits",
1055
- "title": "${config.title.sourceUnits}",
1056
1834
  "flex": "0 0 33%"
1057
1835
  }
1058
1836
  ]
@@ -1101,7 +1879,6 @@
1101
1879
  },
1102
1880
  {
1103
1881
  "key": "accessories[].temperatureUnits",
1104
- "title": "${config.title.sourceUnits}",
1105
1882
  "flex": "0 0 25%"
1106
1883
  }
1107
1884
  ]
@@ -1147,7 +1924,16 @@
1147
1924
  "flex": "0 0 50%"
1148
1925
  }
1149
1926
  ]
1150
- },
1927
+ }
1928
+ ]
1929
+ },
1930
+ {
1931
+ "type": "fieldset",
1932
+ "notitle": true,
1933
+ "condition": {
1934
+ "functionBody": "return ['HeaterCooler', 'Thermostat'].includes(model.accessories?.[arguments[1]]?.info?.type);"
1935
+ },
1936
+ "items": [
1151
1937
  {
1152
1938
  "type": "div",
1153
1939
  "displayFlex": true,
@@ -1180,6 +1966,41 @@
1180
1966
  }
1181
1967
  ]
1182
1968
  },
1969
+ {
1970
+ "type": "fieldset",
1971
+ "notitle": true,
1972
+ "condition": {
1973
+ "functionBody": "return ['AirPurifier', 'HeaterCooler', 'Thermostat'].includes(model.accessories?.[arguments[1]]?.info?.type);"
1974
+ },
1975
+ "items": [
1976
+ {
1977
+ "type": "div",
1978
+ "displayFlex": true,
1979
+ "flex-direction": "row",
1980
+ "items": [
1981
+ {
1982
+ "key": "accessories[].topicGetFilterChangeIndication",
1983
+ "flex": "0 0 50%"
1984
+ },
1985
+ {
1986
+ "key": "accessories[].topicGetFilterLifeLevel",
1987
+ "flex": "0 0 50%"
1988
+ }
1989
+ ]
1990
+ },
1991
+ {
1992
+ "type": "div",
1993
+ "displayFlex": true,
1994
+ "flex-direction": "row",
1995
+ "items": [
1996
+ {
1997
+ "key": "accessories[].topicResetFilterIndication",
1998
+ "flex": "0 0 50%"
1999
+ }
2000
+ ]
2001
+ }
2002
+ ]
2003
+ },
1183
2004
  {
1184
2005
  "type": "div",
1185
2006
  "displayFlex": true,
@@ -1229,15 +2050,16 @@
1229
2050
  {
1230
2051
  "type": "fieldset",
1231
2052
  "title": "${config.title.values}",
2053
+ "description": "${config.description.values}",
1232
2054
  "condition": {
1233
2055
  "functionBody": "return model.accessories?.[arguments[1]]?.info?.type !== undefined;"
1234
2056
  },
1235
2057
  "items": [
1236
- {
2058
+ {
1237
2059
  "type": "fieldset",
1238
2060
  "notitle": true,
1239
2061
  "condition": {
1240
- "functionBody": "return model.accessories?.[arguments[1]]?.info?.type === 'HeaterCooler';"
2062
+ "functionBody": "return ['AirPurifier', 'HeaterCooler'].includes(model.accessories?.[arguments[1]]?.info?.type);"
1241
2063
  },
1242
2064
  "items": [
1243
2065
  {
@@ -1254,7 +2076,52 @@
1254
2076
  "flex": "0 0 20%"
1255
2077
  }
1256
2078
  ]
1257
- },
2079
+ }
2080
+ ]
2081
+ },
2082
+ {
2083
+ "type": "fieldset",
2084
+ "notitle": true,
2085
+ "condition": {
2086
+ "functionBody": "return model.accessories?.[arguments[1]]?.info?.type === 'AirPurifier';"
2087
+ },
2088
+ "items": [
2089
+ {
2090
+ "type": "div",
2091
+ "displayFlex": true,
2092
+ "flex-direction": "row",
2093
+ "items": [
2094
+ {
2095
+ "key": "accessories[].valueModeAuto",
2096
+ "flex": "0 0 20%"
2097
+ },
2098
+ {
2099
+ "key": "accessories[].valueModeManual",
2100
+ "flex": "0 0 20%"
2101
+ },
2102
+ {
2103
+ "key": "accessories[].valueModePurifying",
2104
+ "flex": "0 0 20%"
2105
+ },
2106
+ {
2107
+ "key": "accessories[].valueModeIdle",
2108
+ "flex": "0 0 20%"
2109
+ },
2110
+ {
2111
+ "key": "accessories[].valueModeInactive",
2112
+ "flex": "0 0 20%"
2113
+ }
2114
+ ]
2115
+ }
2116
+ ]
2117
+ },
2118
+ {
2119
+ "type": "fieldset",
2120
+ "notitle": true,
2121
+ "condition": {
2122
+ "functionBody": "return model.accessories?.[arguments[1]]?.info?.type === 'HeaterCooler';"
2123
+ },
2124
+ "items": [
1258
2125
  {
1259
2126
  "type": "div",
1260
2127
  "displayFlex": true,
@@ -1281,7 +2148,16 @@
1281
2148
  "flex": "0 0 20%"
1282
2149
  }
1283
2150
  ]
1284
- },
2151
+ }
2152
+ ]
2153
+ },
2154
+ {
2155
+ "type": "fieldset",
2156
+ "notitle": true,
2157
+ "condition": {
2158
+ "functionBody": "return ['AirPurifier', 'HeaterCooler'].includes(model.accessories?.[arguments[1]]?.info?.type);"
2159
+ },
2160
+ "items": [
1285
2161
  {
1286
2162
  "type": "div",
1287
2163
  "displayFlex": true,
@@ -1307,6 +2183,30 @@
1307
2183
  }
1308
2184
  ]
1309
2185
  },
2186
+ {
2187
+ "type": "fieldset",
2188
+ "notitle": true,
2189
+ "condition": {
2190
+ "functionBody": "return ['AirPurifier', 'HeaterCooler', 'Thermostat'].includes(model.accessories?.[arguments[1]]?.info?.type);"
2191
+ },
2192
+ "items": [
2193
+ {
2194
+ "type": "div",
2195
+ "displayFlex": true,
2196
+ "flex-direction": "row",
2197
+ "items": [
2198
+ {
2199
+ "key": "accessories[].valueFilterChange",
2200
+ "flex": "0 0 20%"
2201
+ },
2202
+ {
2203
+ "key": "accessories[].valueFilterReset",
2204
+ "flex": "0 0 20%"
2205
+ }
2206
+ ]
2207
+ }
2208
+ ]
2209
+ },
1310
2210
  {
1311
2211
  "type": "div",
1312
2212
  "displayFlex": true,
@@ -1329,6 +2229,53 @@
1329
2229
  }
1330
2230
  ]
1331
2231
  },
2232
+ {
2233
+ "type": "fieldset",
2234
+ "notitle": true,
2235
+ "condition": {
2236
+ "functionBody": "return model.accessories?.[arguments[1]]?.info?.type === 'Valve';"
2237
+ },
2238
+ "items": [
2239
+ {
2240
+ "type": "div",
2241
+ "displayFlex": true,
2242
+ "flex-direction": "row",
2243
+ "items": [
2244
+ {
2245
+ "key": "accessories[].valueActive",
2246
+ "flex": "0 0 25%"
2247
+ },
2248
+ {
2249
+ "key": "accessories[].valueInactive",
2250
+ "flex": "0 0 25%"
2251
+ },
2252
+ {
2253
+ "key": "accessories[].valueInUse",
2254
+ "flex": "0 0 25%"
2255
+ }
2256
+ ]
2257
+ },
2258
+ {
2259
+ "type": "div",
2260
+ "displayFlex": true,
2261
+ "flex-direction": "row",
2262
+ "items": [
2263
+ {
2264
+ "key": "accessories[].valueConfigured",
2265
+ "flex": "0 0 25%"
2266
+ },
2267
+ {
2268
+ "key": "accessories[].valueNotConfigured",
2269
+ "flex": "0 0 25%"
2270
+ },
2271
+ {
2272
+ "key": "accessories[].valueFault",
2273
+ "flex": "0 0 25%"
2274
+ }
2275
+ ]
2276
+ }
2277
+ ]
2278
+ },
1332
2279
  {
1333
2280
  "type": "div",
1334
2281
  "displayFlex": true,