File tree Expand file tree Collapse file tree
main/java/com/bigboxer23/switch_bot
test/java/com/bigboxer23/switch_bot/integration 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.2.3 </version >
7+ <version >1.2.4 </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 @@ -13,4 +13,6 @@ public interface IDeviceTypes {
1313 String WATER_DETECTOR = "Water Detector" ;
1414
1515 String METER_PRO_CO2 = "MeterPro(CO2)" ;
16+
17+ String ROLLER_SHADE = "Roller Shade" ;
1618}
Original file line number Diff line number Diff line change 33import com .squareup .moshi .Json ;
44import lombok .Data ;
55
6+ import java .util .List ;
7+
68/** */
79@ Data
810public class Device {
@@ -24,12 +26,20 @@ public class Device {
2426
2527 private boolean group ;
2628
29+ private boolean master ;
30+
31+ private String groupName ;
32+
33+ private List <String > groupingDevicesIds ;
34+
35+ private List <String > curtainDevicesIds ;
36+
37+ private String openDirection ;
38+
2739 private boolean moving ;
2840
2941 private int slidePosition ;
3042
31- private boolean master ;
32-
3343 private String power ;
3444
3545 private float voltage ;
@@ -46,6 +56,12 @@ public class Device {
4656 @ Json (name = "CO2" )
4757 private int co2 ;
4858
59+ private boolean calibrate ;
60+
61+ private String hubDeviceId ;
62+
63+ private boolean enableCloudService ;
64+
4965 public boolean isDry () {
5066 return waterDetectorStatus == 0 ;
5167 }
Original file line number Diff line number Diff line change @@ -67,6 +67,11 @@ public void testDeviceStatus() throws IOException {
6767 }
6868 case IDeviceTypes .WATER_DETECTOR -> assertTrue (status .isWet () || status .isDry ());
6969 case IDeviceTypes .METER_PRO_CO2 -> assertTrue (status .getCo2 () > 0 );
70+ case IDeviceTypes .ROLLER_SHADE -> {
71+ assertTrue (status .isCalibrate ());
72+ assertNotNull (device .getGroupingDevicesIds ());
73+ assertNotNull (device .getGroupName ());
74+ }
7075 }
7176 }
7277 }
You can’t perform that action at this time.
0 commit comments