mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[tacmi] TA-CMI: Fixed some issues when percent values are received or updated (#9061)
Fixes #8927 Signed-off-by: Christian Niessner <github-marvkis@christian-niessner.de>
This commit is contained in:
parent
06d367a0dd
commit
c83af2c66d
@ -342,7 +342,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…
Reference in New Issue
Block a user