[tacmi] TA-CMI: Fixed some issues when percent values are received or updated (#9047)
Signed-off-by: Christian Niessner <github-marvkis@christian-niessner.de>
This commit is contained in:
parent
2930e431ad
commit
754daa0140
@ -344,7 +344,8 @@ public class ApiPageParser extends AbstractSimpleMarkupHandler {
|
||||
channelType = "Number:Temperature";
|
||||
state = new QuantityType<>(bd, SIUnits.CELSIUS);
|
||||
} else if ("%".equals(valParts[1])) {
|
||||
channelType = "Number:Percent";
|
||||
// channelType = "Number:Percent"; Number:Percent is currently not handled...
|
||||
channelType = "Number:Dimensionless";
|
||||
state = new QuantityType<>(bd, SmartHomeUnits.PERCENT);
|
||||
} else if ("Imp".equals(valParts[1])) {
|
||||
// impulses - no idea how to map this to something useful here?
|
||||
|
||||
@ -250,6 +250,17 @@ public class TACmiSchemaHandler extends BaseThingHandler {
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case NUMERIC_FORM:
|
||||
ChangerX2Entry cx2en = e.changerX2Entry;
|
||||
if (cx2en != null) {
|
||||
reqUpdate = prepareRequest(buildUri("INCLUDE/change.cgi?changeadrx2=" + cx2en.address
|
||||
+ "&changetox2=" + command.format("%.2f")));
|
||||
reqUpdate.header(HttpHeader.REFERER, this.serverBase + "schema.html"); // required...
|
||||
} else {
|
||||
logger.debug("Got command for uninitalized channel {}: {}", channelUID, command);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case READ_ONLY_NUMERIC:
|
||||
case READ_ONLY_STATE:
|
||||
case READ_ONLY_SWITCH:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user