How to update a text item with a rule

Hello,
I have a text item to display temperature and i want to set its value with a rule.

My sitemap and rule is as follows

sitemap default label="House"
{
  Text item=room_temp label="Room Temperature [%.1f C]" icon="temperature"
}
---------------------------------------------------

rule "Display temperature"
when
   Item room_temp received update
then
 postUpdate(room_temp,0)
end

I tried to set the temperature to 0 in the above rule. But i get an error in OpenHab
"Cannot retrieve item room_temp for widget org.openhab.model.sitemap.Text"

Any idea what could be wrong?

You do have room_temp defined (as a Number item) in an .item file as well, right?

I did not have a number in the item file.

I have added this to default.items:
Number room_temp

Unfortunately, I did not see the number updated but the error seems to have gone

This worked!

rule "Display temperature"
when
Item room_temp received update or
Item room_temp received changed or
System started

then
var tem_room=100
postUpdate(room_temp,tem_room)
end

I also want to update a number item with postUpdate… why doesn’t it work like this?

postUpdate(item,0)

If it is a Number it sould work.
Post the items- and rules-code please.