since knx_2_float can't handle 0, bypass converting 0 value from knx to float (#6626)

This commit is contained in:
Yum 2017-03-15 04:25:52 +01:00 committed by Paulus Schoutsen
parent fff589eeab
commit 97b9d3bd21

View file

@ -129,6 +129,6 @@ class KNXSensorFloatClass(KNXGroupAddress, KNXSensorBaseClass):
self._value = None
if self._data:
value = knx2_to_float(self._data)
value = 0 if self._data == 0 else knx2_to_float(self._data)
if self._minimum_value <= value <= self._maximum_value:
self._value = value