File tree Expand file tree Collapse file tree
main/java/com/bigboxer23/switch_bot
test/java/com/bigboxer23/switch_bot Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55 <groupId >com.bigboxer23</groupId >
66 <artifactId >switchbotapi-java</artifactId >
7- <version >1.1.8 </version >
7+ <version >1.1.9 </version >
88
99 <name >switchbotapi-java</name >
1010 <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 {
1111 String PLUG_MINI = "Plug Mini (US)" ;
1212
1313 String WATER_DETECTOR = "Water Detector" ;
14+
15+ String METER_PRO_CO2 = "MeterPro(CO2)" ;
1416}
Original file line number Diff line number Diff line change @@ -41,9 +41,12 @@ public class Device {
4141
4242 private float electricCurrent ; // amps / 10
4343
44- @ Json ( name = "status" )
44+
4545 private int waterDetectorStatus ;
4646
47+ @ Json (name = "CO2" )
48+ private int co2 ;
49+
4750 public boolean isDry () {
4851 return waterDetectorStatus == 0 ;
4952 }
Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ public void testDeviceStatus() throws IOException {
6666 assertTrue (status .getElectricCurrent () > -1 );
6767 }
6868 case IDeviceTypes .WATER_DETECTOR -> assertTrue (status .isWet ());
69+ case IDeviceTypes .METER_PRO_CO2 -> assertTrue (status .getCo2 () > 0 );
6970 }
7071 }
7172 }
You can’t perform that action at this time.
0 commit comments