You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Item.sendCommandIfDifferent(value) is an easy way to only send updates if something changed.
However if the items state is a QuantityType and the value is a Number or a String without a quantity, this method always detects a change.
This is, because it compares the strings directly and if for example the state returns 26 °C and the value is 26, these are different.
It would be good if this method handles such cases and if value is a number, it just compares the number of the state and not the value too.
The text was updated successfully, but these errors were encountered:
Item.sendCommandIfDifferent(value)
is an easy way to only send updates if something changed.However if the items state is a
QuantityType
and thevalue
is aNumber
or aString
without a quantity, this method always detects a change.This is, because it compares the strings directly and if for example the state returns
26 °C
and the value is26
, these are different.It would be good if this method handles such cases and if
value
is a number, it just compares the number of the state and not the value too.The text was updated successfully, but these errors were encountered: