Open mueller-ma opened 1 month ago
It's type of niche, but I see the use case.
This only applies to Number Items.
I would say Dimmer
Items, not Number
. Did you mean that?
Hm, it applies to all Items that can have a state as a number, e.g. also Rollershutter.
I have a rule "when it gets dark outside, turn on the lights to 20%":
items.getItem("Lights").sendCommand("20")
. However this will darken the light when it has been turned to 100% manually before. I wrapped it in aif
to avoid this, but maybe a function for this could be added, similar tosendCommandIfDifferent()
:increaseValueTo(value)
: Send the command only whenvalue
is larger than the current state.decreaseValueTo(value)
: Send the command only whenvalue
is smaller than the current state.This only applies to
Number
Items.Feel free to close this if you think it's too niche.