]> git.basschouten.com Git - openhab-addons.git/commit
[mqtt] Interpet incoming NaN as UNDEF for NumberValues (#15897)
authorCody Cutrer <cody@cutrer.us>
Sun, 10 Dec 2023 10:01:15 +0000 (03:01 -0700)
committerGitHub <noreply@github.com>
Sun, 10 Dec 2023 10:01:15 +0000 (11:01 +0100)
commitc3660e2414d31d6417e2c619c3544ed4d80a6660
tree4ee193907dace2eb2fe9f39be531b0fa8554ca15
parent92383abf57de31242cc82d0c037ff2200329431a
[mqtt] Interpet incoming NaN as UNDEF for NumberValues (#15897)

* [mqtt] Interpet incoming NaN as UNDEF for NumberValues

Since DecimalType and QuantityType don't support NaN, but
when you're linking to a topic that the device is using
floating point, NaN might happen.

---------

Signed-off-by: Cody Cutrer <cody@cutrer.us>
bundles/org.openhab.binding.mqtt.generic/src/main/java/org/openhab/binding/mqtt/generic/ChannelConfig.java
bundles/org.openhab.binding.mqtt.generic/src/main/java/org/openhab/binding/mqtt/generic/ChannelState.java
bundles/org.openhab.binding.mqtt.generic/src/main/java/org/openhab/binding/mqtt/generic/values/NumberValue.java
bundles/org.openhab.binding.mqtt.generic/src/main/java/org/openhab/binding/mqtt/generic/values/Value.java
bundles/org.openhab.binding.mqtt.generic/src/main/resources/OH-INF/config/number-channel-config.xml
bundles/org.openhab.binding.mqtt.generic/src/main/resources/OH-INF/i18n/mqtt.properties
bundles/org.openhab.binding.mqtt.generic/src/test/java/org/openhab/binding/mqtt/generic/values/ValueTests.java