I have an item:
Switch Spotlight "Spot is [%s]" <spotlight> (gGFl,gCP, Lights) {mqtt="<[mosquitto:home/outside/spot:state:default],>[mosquitto:home/outside/spot:command:*:default]"}
that I change the state of in a rule with the commands:
postUpdate(Spotlight,OFF)
and
postUpdate(Spotlight,ON)
The rule works well, whenever triggered (it is bound to day and night) I see the state of the item change.
However… I see no MQTT ON/OFF command being send and the lamp does not react at all
If I work the switch manually it works fine.
So I tried
Spotlight.postUpdate(OFF)
and
Spotlight.postUpdate(ON)
Same effect, the item is nicely updated but the lamp does not react, no MQTT command is sent
Obviously I am making a thinking mistake here. What am I doing wrong?
Wait a minute, maybe I need to add "sendCommand"
lemme try that
Yep that seemed to be it. Sorry for bothering