mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-11 13:41:53 +01:00
35a70064c4
Some bindings that dynamically create channels (mqtt.homie) might create a channel that declares itself as Number:Dimensionless because the end-device metadata has a unit of "%". But a savvy user might want to link that to a Dimmer or Rollershutter item depending on what the device actually is. This actually works just fine since QuantityType (with unit PERCENT) and PercentType implicitly convert between each other. Except this odd compatibility code in CommunicationManager that tries to assist bindings that _aren't_ QuantityType compatible. It assumes if the channel's item type is a dimensioned item, that the actual Item is a NumberItem, and casts without checking. All this does is checks for that case to avoid a ClassCastException. Signed-off-by: Cody Cutrer <cody@cutrer.us> |
||
---|---|---|
.. | ||
src | ||
.classpath | ||
.project | ||
NOTICE | ||
pom.xml |