11package io .github .hapjava .accessories .optionalcharacteristic ;
22
33import io .github .hapjava .characteristics .HomekitCharacteristicChangeCallback ;
4+ import io .github .hapjava .characteristics .impl .carbonmonoxidesensor .CarbonMonoxideLevelCharacteristic ;
5+ import io .github .hapjava .characteristics .impl .carbonmonoxidesensor .CarbonMonoxidePeakLevelCharacteristic ;
46import java .util .concurrent .CompletableFuture ;
57
6- /** Accessory with carbon dioxide level and peak level characteristic. */
8+ /** Accessory with carbon monoxide level and peak level characteristic. */
79public interface AccessoryWithCarbonMonoxideLevel {
810
911 /**
@@ -20,6 +22,66 @@ public interface AccessoryWithCarbonMonoxideLevel {
2022 */
2123 CompletableFuture <Double > getCarbonMonoxideLevel ();
2224
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+
2385 /**
2486 * Subscribes to changes in the carbon monoxide level.
2587 *
0 commit comments