diff --git a/bundles/org.openhab.binding.omnilink/pom.xml b/bundles/org.openhab.binding.omnilink/pom.xml index ee0e2767fb4ae..07e400f6ccd16 100644 --- a/bundles/org.openhab.binding.omnilink/pom.xml +++ b/bundles/org.openhab.binding.omnilink/pom.xml @@ -18,7 +18,7 @@ com.github.digitaldan jomnilink - 1.4.0 + 1.4.1 compile diff --git a/bundles/org.openhab.binding.omnilink/src/main/java/org/openhab/binding/omnilink/internal/handler/HumiditySensorHandler.java b/bundles/org.openhab.binding.omnilink/src/main/java/org/openhab/binding/omnilink/internal/handler/HumiditySensorHandler.java index bda8fe7df6112..a0751d68b7fa3 100644 --- a/bundles/org.openhab.binding.omnilink/src/main/java/org/openhab/binding/omnilink/internal/handler/HumiditySensorHandler.java +++ b/bundles/org.openhab.binding.omnilink/src/main/java/org/openhab/binding/omnilink/internal/handler/HumiditySensorHandler.java @@ -113,12 +113,12 @@ public void handleCommand(ChannelUID channelUID, Command command) { switch (channelUID.getId()) { case CHANNEL_AUX_LOW_SETPOINT: sendOmnilinkCommand(OmniLinkCmd.CMD_THERMO_SET_HEAT_LOW_POINT.getNumber(), - TemperatureFormat.FAHRENHEIT.formatToOmni(((QuantityType) command).intValue()), + TemperatureFormat.FAHRENHEIT.formatToOmni(((QuantityType) command).floatValue()), thingID); break; case CHANNEL_AUX_HIGH_SETPOINT: sendOmnilinkCommand(OmniLinkCmd.CMD_THERMO_SET_COOL_HIGH_POINT.getNumber(), - TemperatureFormat.FAHRENHEIT.formatToOmni(((QuantityType) command).intValue()), + TemperatureFormat.FAHRENHEIT.formatToOmni(((QuantityType) command).floatValue()), thingID); break; default: diff --git a/bundles/org.openhab.binding.omnilink/src/main/java/org/openhab/binding/omnilink/internal/handler/TempSensorHandler.java b/bundles/org.openhab.binding.omnilink/src/main/java/org/openhab/binding/omnilink/internal/handler/TempSensorHandler.java index 850e2ad99c4c3..7152841ae0076 100644 --- a/bundles/org.openhab.binding.omnilink/src/main/java/org/openhab/binding/omnilink/internal/handler/TempSensorHandler.java +++ b/bundles/org.openhab.binding.omnilink/src/main/java/org/openhab/binding/omnilink/internal/handler/TempSensorHandler.java @@ -126,12 +126,12 @@ public void handleCommand(ChannelUID channelUID, Command command) { switch (channelUID.getId()) { case CHANNEL_AUX_LOW_SETPOINT: sendOmnilinkCommand(OmniLinkCmd.CMD_THERMO_SET_HEAT_LOW_POINT.getNumber(), - temperatureFormat.get().formatToOmni(((QuantityType) command).intValue()), + temperatureFormat.get().formatToOmni(((QuantityType) command).floatValue()), thingID); break; case CHANNEL_AUX_HIGH_SETPOINT: sendOmnilinkCommand(OmniLinkCmd.CMD_THERMO_SET_COOL_HIGH_POINT.getNumber(), - temperatureFormat.get().formatToOmni(((QuantityType) command).intValue()), + temperatureFormat.get().formatToOmni(((QuantityType) command).floatValue()), thingID); break; default: diff --git a/bundles/org.openhab.binding.omnilink/src/main/java/org/openhab/binding/omnilink/internal/handler/TemperatureFormat.java b/bundles/org.openhab.binding.omnilink/src/main/java/org/openhab/binding/omnilink/internal/handler/TemperatureFormat.java index 8379e0dfb2ef6..fdff35def4a48 100644 --- a/bundles/org.openhab.binding.omnilink/src/main/java/org/openhab/binding/omnilink/internal/handler/TemperatureFormat.java +++ b/bundles/org.openhab.binding.omnilink/src/main/java/org/openhab/binding/omnilink/internal/handler/TemperatureFormat.java @@ -33,7 +33,7 @@ public float omniToFormat(int omniNumber) { } @Override - public int formatToOmni(int celsius) { + public int formatToOmni(float celsius) { return MessageUtils.CToOmni(celsius); } }, @@ -44,7 +44,7 @@ public float omniToFormat(int omniNumber) { } @Override - public int formatToOmni(int fahrenheit) { + public int formatToOmni(float fahrenheit) { return MessageUtils.FtoOmni(fahrenheit); } }; @@ -69,7 +69,7 @@ private TemperatureFormat(int formatNumber) { * @param format Number in the current format. * @return Omni formatted number. */ - public abstract int formatToOmni(int format); + public abstract int formatToOmni(float format); /** * Get the number which identifies this format as defined by the omniprotocol. diff --git a/bundles/org.openhab.binding.omnilink/src/main/java/org/openhab/binding/omnilink/internal/handler/ThermostatHandler.java b/bundles/org.openhab.binding.omnilink/src/main/java/org/openhab/binding/omnilink/internal/handler/ThermostatHandler.java index 37fb57f2f7a6d..f5daccab31857 100644 --- a/bundles/org.openhab.binding.omnilink/src/main/java/org/openhab/binding/omnilink/internal/handler/ThermostatHandler.java +++ b/bundles/org.openhab.binding.omnilink/src/main/java/org/openhab/binding/omnilink/internal/handler/ThermostatHandler.java @@ -157,22 +157,22 @@ public void handleCommand(ChannelUID channelUID, Command command) { break; case CHANNEL_THERMO_HEAT_SETPOINT: sendOmnilinkCommand(OmniLinkCmd.CMD_THERMO_SET_HEAT_LOW_POINT.getNumber(), - temperatureFormat.get().formatToOmni(((QuantityType) command).intValue()), + temperatureFormat.get().formatToOmni(((QuantityType) command).floatValue()), thingID); break; case CHANNEL_THERMO_COOL_SETPOINT: sendOmnilinkCommand(OmniLinkCmd.CMD_THERMO_SET_COOL_HIGH_POINT.getNumber(), - temperatureFormat.get().formatToOmni(((QuantityType) command).intValue()), + temperatureFormat.get().formatToOmni(((QuantityType) command).floatValue()), thingID); break; case CHANNEL_THERMO_HUMIDIFY_SETPOINT: sendOmnilinkCommand(OmniLinkCmd.CMD_THERMO_SET_HUMDIFY_POINT.getNumber(), - TemperatureFormat.FAHRENHEIT.formatToOmni(((QuantityType) command).intValue()), + TemperatureFormat.FAHRENHEIT.formatToOmni(((QuantityType) command).floatValue()), thingID); break; case CHANNEL_THERMO_DEHUMIDIFY_SETPOINT: sendOmnilinkCommand(OmniLinkCmd.CMD_THERMO_SET_DEHUMIDIFY_POINT.getNumber(), - TemperatureFormat.FAHRENHEIT.formatToOmni(((QuantityType) command).intValue()), + TemperatureFormat.FAHRENHEIT.formatToOmni(((QuantityType) command).floatValue()), thingID); break; default: