Skip to content

Commit 7dc951c

Browse files
committed
#704 Fix issue with thermostat control
1 parent 7b7bc31 commit 7dc951c

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

app/src/main/java/nl/hnogames/domoticz/adapters/DashboardAdapter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ private void setSwitchRowData(DevicesInfo mDeviceInfo,
250250
setButtons(holder, Buttons.ADS);
251251
setAdsLayout(holder);
252252
} else if ((mDeviceInfo.getType() != null && DomoticzValues.Device.Utility.Type.THERMOSTAT.equalsIgnoreCase(mDeviceInfo.getType())) ||
253+
(mDeviceInfo.getSubType() != null && DomoticzValues.Device.Utility.SubType.SETPOINT.equalsIgnoreCase(mDeviceInfo.getSubType())) ||
253254
(mDeviceInfo.getSubType() != null && DomoticzValues.Device.Utility.SubType.SMARTWARES.equalsIgnoreCase(mDeviceInfo.getSubType()))) {
254255
setButtons(holder, Buttons.BUTTON_ON);
255256
setThermostatRowData(mDeviceInfo, holder);

app/src/main/java/nl/hnogames/domoticz/adapters/UtilityAdapter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ public void onBindViewHolder(final DataObjectHolder holder, final int position)
162162
setAdsLayout(holder);
163163
} else {
164164
if ((mUtilitiesInfo.getType() != null && DomoticzValues.Device.Utility.Type.THERMOSTAT.equalsIgnoreCase(mUtilitiesInfo.getType())) ||
165+
(mUtilitiesInfo.getSubType() != null && DomoticzValues.Device.Utility.SubType.SETPOINT.equalsIgnoreCase(mUtilitiesInfo.getSubType())) ||
165166
(mUtilitiesInfo.getSubType() != null && DomoticzValues.Device.Utility.SubType.SMARTWARES.equalsIgnoreCase(mUtilitiesInfo.getSubType()))) {
166167
setButtons(holder, Buttons.THERMOSTAT);
167168
CreateThermostatRow(holder, mUtilitiesInfo, setPoint);

app/src/main/java/nl/hnogames/domoticz/utils/DeviceUtils.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ public static boolean isAutomatedToggableDevice(DevicesInfo mDeviceInfo) {
4040
return false;
4141
if (mDeviceInfo.getSwitchTypeVal() == 0 &&
4242
(mDeviceInfo.getSwitchType() == null)) {
43-
if (mDeviceInfo.getSubType() != null && mDeviceInfo.getSubType().equals(DomoticzValues.Device.Utility.SubType.SMARTWARES)) {
43+
if ((mDeviceInfo.getSubType() != null && DomoticzValues.Device.Utility.SubType.SETPOINT.equalsIgnoreCase(mDeviceInfo.getSubType())) ||
44+
(mDeviceInfo.getSubType() != null && mDeviceInfo.getSubType().equals(DomoticzValues.Device.Utility.SubType.SMARTWARES))) {
4445
return true;
4546
} else {
4647
switch (mDeviceInfo.getType()) {
4748
case DomoticzValues.Scene.Type.GROUP:
48-
return true;
4949
case DomoticzValues.Scene.Type.SCENE:
5050
return true;
5151
case DomoticzValues.Device.Utility.Type.THERMOSTAT:
@@ -96,7 +96,8 @@ public static boolean isSupportedForExternalControl(DevicesInfo mDeviceInfo) {
9696
return false;
9797
if (mDeviceInfo.getSwitchTypeVal() == 0 &&
9898
(mDeviceInfo.getSwitchType() == null)) {
99-
if (mDeviceInfo.getSubType() != null && mDeviceInfo.getSubType().equals(DomoticzValues.Device.Utility.SubType.SMARTWARES)) {
99+
if ((mDeviceInfo.getSubType() != null && DomoticzValues.Device.Utility.SubType.SETPOINT.equalsIgnoreCase(mDeviceInfo.getSubType())) ||
100+
(mDeviceInfo.getSubType() != null && mDeviceInfo.getSubType().equals(DomoticzValues.Device.Utility.SubType.SMARTWARES))) {
100101
return true;
101102
} else {
102103
switch (mDeviceInfo.getType()) {

app/version.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Thu Oct 26 22:03:43 CEST 2023
2-
VERSION_BUILD=9409
3-
VERSION_CODE=683
4-
VERSION_PATCH=366
1+
#Mon Jan 08 21:33:02 CET 2024
2+
VERSION_BUILD=9414
3+
VERSION_CODE=684
4+
VERSION_PATCH=367

domoticzapi/version.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Thu Oct 26 22:03:44 CEST 2023
1+
#Mon Jan 08 21:33:02 CET 2024
22
VERSION_BUILD=3675
33
VERSION_CODE=254
44
VERSION_PATCH=254

0 commit comments

Comments
 (0)