File tree 4 files changed +8
-2
lines changed
main/java/com/bigboxer23/switch_bot
test/java/com/bigboxer23/switch_bot
4 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 4
4
5
5
<groupId >com.bigboxer23</groupId >
6
6
<artifactId >switchbotapi-java</artifactId >
7
- <version >1.1.8 </version >
7
+ <version >1.1.9 </version >
8
8
9
9
<name >switchbotapi-java</name >
10
10
<url >https://github.com/bigboxer23/switchbotapi-java</url >
Original file line number Diff line number Diff line change @@ -11,4 +11,6 @@ public interface IDeviceTypes {
11
11
String PLUG_MINI = "Plug Mini (US)" ;
12
12
13
13
String WATER_DETECTOR = "Water Detector" ;
14
+
15
+ String METER_PRO_CO2 = "MeterPro(CO2)" ;
14
16
}
Original file line number Diff line number Diff line change @@ -41,9 +41,12 @@ public class Device {
41
41
42
42
private float electricCurrent ; // amps / 10
43
43
44
- @ Json ( name = "status" )
44
+
45
45
private int waterDetectorStatus ;
46
46
47
+ @ Json (name = "CO2" )
48
+ private int co2 ;
49
+
47
50
public boolean isDry () {
48
51
return waterDetectorStatus == 0 ;
49
52
}
Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ public void testDeviceStatus() throws IOException {
66
66
assertTrue (status .getElectricCurrent () > -1 );
67
67
}
68
68
case IDeviceTypes .WATER_DETECTOR -> assertTrue (status .isWet ());
69
+ case IDeviceTypes .METER_PRO_CO2 -> assertTrue (status .getCo2 () > 0 );
69
70
}
70
71
}
71
72
}
You can’t perform that action at this time.
0 commit comments