]> git.basschouten.com Git - openhab-addons.git/commit
[mqtt] set the proper unit in the state description (#13604)
authorCody Cutrer <cody@cutrer.us>
Thu, 27 Oct 2022 06:34:50 +0000 (00:34 -0600)
committerGitHub <noreply@github.com>
Thu, 27 Oct 2022 06:34:50 +0000 (08:34 +0200)
commit26ad08cca9bda7a3bfe69a039a0bb9fdf1ec3c85
tree28f95814cb55f335e2039205fac25f0ffd7d2eee
parent234d354a2e513e534f0b7404952caf7e4a235fac
[mqtt] set the proper unit in the state description (#13604)

So that other pieces of openhab can know what unit it's going to be,
without it having a value yet. Importantly, any necessary conversion
that need to be applied to the other portion of the state description -
min, max, and step.

See also https://github.com/openhab/openhab-core/pull/3132

Signed-off-by: Cody Cutrer <cody@cutrer.us>
bundles/org.openhab.binding.mqtt.generic/src/main/java/org/openhab/binding/mqtt/generic/values/NumberValue.java
bundles/org.openhab.binding.mqtt.homeassistant/src/test/java/org/openhab/binding/mqtt/homeassistant/internal/component/SensorTests.java