mm1804
(Markus)
November 29, 2015, 4:36pm
1
Hi all,
can somebody tell me how to pass a variable (which content I have set in the GUI) within sendCommand?
I’m trying something like this - but ger a type mismatch error (Command vs NumberItem):
``
sendCommand(Keller_Temperatur_Setpoint,Keller_low)
How to cast Keller_low to a command type?
Thanks for your comments!
MM1804
If Keller_low is an Item.
It should be something like this:
sendCommand(Keller_Temperatur_Setpoint,Keller_low.state)
You just passed the Item, but not the value (state)) of the Item.
mm1804
(Markus)
November 29, 2015, 6:46pm
3
yet it is an item - actually a setpoint item so that I can set my target Temperature in the GUI instead of hardcoding.
I tried adding .state but then get a type mismatch Command vs state (so does also not help…)
sendCommand(Keller_Temperatur_Setpoint,20) works…
I think you have to cast the Type:
sendCommand(Keller_Temperatur_Setpoint,Keller_low.state as DecimalType )
1 Like
mm1804
(Markus)
December 2, 2015, 8:45pm
5
works perfect, thanks for the help!!!
Just love the help of this community