File tree Expand file tree Collapse file tree 4 files changed +38
-12
lines changed
src/main/java/nl/hnogames/domoticzapi/Containers Expand file tree Collapse file tree 4 files changed +38
-12
lines changed Original file line number Diff line number Diff line change 1
- # Fri Jun 14 15:38:04 CEST 2019
2
- VERSION_BUILD =5910
1
+ # Fri Jun 14 15:47:17 CEST 2019
2
+ VERSION_BUILD =5911
3
3
VERSION_PATCH =110
4
4
VERSION_CODE =426
Original file line number Diff line number Diff line change @@ -119,12 +119,29 @@ public DevicesInfo(JSONObject row) throws JSONException {
119
119
Chill = row .getString ("Chill" );
120
120
if (row .has ("Speed" ))
121
121
Speed = row .getString ("Speed" );
122
- if (row .has ("DewPoint" ))
123
- DewPoint = row .getLong ("DewPoint" );
124
- if (row .has ("Temp" ))
125
- Temp = row .getLong ("Temp" );
126
- if (row .has ("Barometer" ))
127
- Barometer = row .getInt ("Barometer" );
122
+
123
+ if (row .has ("DewPoint" )) {
124
+ try {
125
+ DewPoint = row .getLong ("DewPoint" );
126
+ } catch (Exception ex ) {
127
+ DewPoint = 0 ;
128
+ }
129
+ }
130
+ if (row .has ("Temp" )) {
131
+ try {
132
+ Temp = row .getLong ("Temp" );
133
+ } catch (Exception ex ) {
134
+ Temp = 0 ;
135
+ }
136
+ }
137
+ if (row .has ("Barometer" )) {
138
+ try {
139
+ Barometer = row .getInt ("Barometer" );
140
+ } catch (Exception ex ) {
141
+ Barometer = 0 ;
142
+ }
143
+ }
144
+
128
145
if (row .has ("Description" ))
129
146
Description = row .getString ("Description" );
130
147
Original file line number Diff line number Diff line change @@ -65,7 +65,9 @@ public TemperatureInfo(JSONObject row) throws JSONException {
65
65
try {
66
66
if (row .has ("Temp" ))
67
67
Temp = row .getDouble ("Temp" );
68
- }catch (Exception ex ){}
68
+ }catch (Exception ex ){
69
+ Temp = 0 ;
70
+ }
69
71
70
72
if (row .has ("LastUpdate" ))
71
73
LastUpdate = row .getString ("LastUpdate" );
@@ -75,8 +77,15 @@ public TemperatureInfo(JSONObject row) throws JSONException {
75
77
TypeImg = row .getString ("TypeImg" );
76
78
if (row .has ("DirectionStr" ))
77
79
Direction = row .getString ("DirectionStr" );
78
- if (row .has ("SetPoint" ))
79
- setPoint = row .getDouble ("SetPoint" );
80
+
81
+ if (row .has ("SetPoint" )) {
82
+ try {
83
+ setPoint = row .getDouble ("SetPoint" );
84
+ } catch (Exception ex ) {
85
+ setPoint = 0 ;
86
+ }
87
+ }
88
+
80
89
if (row .has ("Name" ))
81
90
Name = row .getString ("Name" );
82
91
if (row .has ("Description" ))
Original file line number Diff line number Diff line change 1
- # Fri Jun 14 15:38:04 CEST 2019
1
+ # Fri Jun 14 15:47:17 CEST 2019
2
2
VERSION_BUILD =3675
3
3
VERSION_PATCH =219
4
4
VERSION_CODE =219
You can’t perform that action at this time.
0 commit comments