Update String item manually

Hey guys,

I would like to update a String item to display my current heating mode status. Currently i have 4 heating modes that i set per rules. Works so far. now i defined a string item which i would like to update with the corresponding heating mode. For example when the heating is in day mode it should display day. i tried :

heating_mode_current.sendCommand("Day")

to update it with the string day. That did not work. Any advices?

heating_mode_current.postUpdate("Day")

It sounds like you only want to update the state of the item instead of sending the item a command. You would send a command to an item if a binding or rule were listening for commands to the item to take some action. If your heating_mode_current item were connected to a binding or a rule triggered on Item heating_mode_current received command, sending the item a "Day" command would mean, “hey heating_mode_current item, I command you to switch to the Day heating mode.”

The item’s state, changed with postUpdate, it to cause the item to reflect the current state.

1 Like

thanks through the API i can see that it is now updating to the right state. But it is not reflected in the sitemap. im trying to use a plain text item:

Text item=heating_mode_current

Mhm

how did you define the item label? Should be at least something like

String heating_mode_current "heating mode is [%s]"

or in .sitemap

Text item=heating_mode_current label="heating mode is [%s]"
2 Likes