[openwebnet] Backward support for CU configurations with where="0" (#15248)
Signed-off-by: Massimo Valla <mvcode00@gmail.com>
This commit is contained in:
parent
00da6457f0
commit
a7ab2afbb3
|
@ -267,7 +267,11 @@ public class OpenWebNetThermoregulationHandler extends OpenWebNetThingHandler {
|
||||||
|
|
||||||
private String getWhere(String where) {
|
private String getWhere(String where) {
|
||||||
if (isCentralUnit) {
|
if (isCentralUnit) {
|
||||||
return where;
|
if (where.charAt(0) == '#') {
|
||||||
|
return where;
|
||||||
|
} else { // to support old configurations for CU with where="0"
|
||||||
|
return "#" + where;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return isStandAlone ? where : "#" + where;
|
return isStandAlone ? where : "#" + where;
|
||||||
}
|
}
|
||||||
|
@ -580,10 +584,8 @@ public class OpenWebNetThermoregulationHandler extends OpenWebNetThingHandler {
|
||||||
String w = deviceWhere.value();
|
String w = deviceWhere.value();
|
||||||
|
|
||||||
if (isCentralUnit) {
|
if (isCentralUnit) {
|
||||||
// TODO: 4 zone central -> zone #0 CAN be also a zone with its temp.. with
|
|
||||||
// 99-zones central no! let's assume it's a 99 zone
|
|
||||||
try {
|
try {
|
||||||
send(Thermoregulation.requestStatus(w));
|
send(Thermoregulation.requestStatus(getWhere(w)));
|
||||||
} catch (OWNException e) {
|
} catch (OWNException e) {
|
||||||
logger.warn("refreshDevice() central unit returned OWNException {}", e.getMessage());
|
logger.warn("refreshDevice() central unit returned OWNException {}", e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue