1
1
package io .github .hapjava .accessories .optionalcharacteristic ;
2
2
3
3
import io .github .hapjava .characteristics .HomekitCharacteristicChangeCallback ;
4
+ import io .github .hapjava .characteristics .impl .carbonmonoxidesensor .CarbonMonoxideLevelCharacteristic ;
5
+ import io .github .hapjava .characteristics .impl .carbonmonoxidesensor .CarbonMonoxidePeakLevelCharacteristic ;
4
6
import java .util .concurrent .CompletableFuture ;
5
7
6
- /** Accessory with carbon dioxide level and peak level characteristic. */
8
+ /** Accessory with carbon monoxide level and peak level characteristic. */
7
9
public interface AccessoryWithCarbonMonoxideLevel {
8
10
9
11
/**
@@ -20,6 +22,66 @@ public interface AccessoryWithCarbonMonoxideLevel {
20
22
*/
21
23
CompletableFuture <Double > getCarbonMonoxideLevel ();
22
24
25
+ /**
26
+ * return the min value for carbon monoxide level. overwrite if you want to change the default
27
+ * value.
28
+ *
29
+ * @return min carbon monoxide level
30
+ */
31
+ default double getMinCarbonMonoxideLevel () {
32
+ return CarbonMonoxideLevelCharacteristic .DEFAULT_MIN_VALUE ;
33
+ }
34
+
35
+ /**
36
+ * return the max value for carbon monoxide level. overwrite if you want to change the default
37
+ * value.
38
+ *
39
+ * @return max carbon monoxide level
40
+ */
41
+ default double getMaxCarbonMonoxideLevel () {
42
+ return CarbonMonoxideLevelCharacteristic .DEFAULT_MAX_VALUE ;
43
+ }
44
+
45
+ /**
46
+ * return the min step value for carbon monoxide level. overwrite if you want to change the
47
+ * default value.
48
+ *
49
+ * @return min step carbon monoxide level
50
+ */
51
+ default double getMinStepCarbonMonoxideLevel () {
52
+ return CarbonMonoxideLevelCharacteristic .DEFAULT_STEP ;
53
+ }
54
+
55
+ /**
56
+ * return the min value for carbon monoxide peak level. overwrite if you want to change the
57
+ * default value.
58
+ *
59
+ * @return min carbon monoxide peak level
60
+ */
61
+ default double getMinCarbonMonoxidePeakLevel () {
62
+ return CarbonMonoxidePeakLevelCharacteristic .DEFAULT_MIN_VALUE ;
63
+ }
64
+
65
+ /**
66
+ * return the max value for carbon monoxide peak level. overwrite if you want to change the
67
+ * default value.
68
+ *
69
+ * @return max carbon monoxide peak level
70
+ */
71
+ default double getMaxCarbonMonoxidePeakLevel () {
72
+ return CarbonMonoxidePeakLevelCharacteristic .DEFAULT_MAX_VALUE ;
73
+ }
74
+
75
+ /**
76
+ * return the min step value for carbon monoxide peak level. overwrite if you want to change the
77
+ * default value.
78
+ *
79
+ * @return min step carbon monoxide peak level
80
+ */
81
+ default double getMinStepCarbonMonoxidePeakLevel () {
82
+ return CarbonMonoxidePeakLevelCharacteristic .DEFAULT_STEP ;
83
+ }
84
+
23
85
/**
24
86
* Subscribes to changes in the carbon monoxide level.
25
87
*
0 commit comments