[SOLVED] Send message to widget

Hello everyone, I would like to have advice on how to implement a rule, I would like to display on a widget on the home page a message if a certain condition occurs, for example if the boiler temperature exceeds a certain value write “Warning high temperature” or if start irrigation write, “Irrigation ON” etc.
I would like some tips on what to study
Thank you

create a string item

String temperature_warning

And then use a rule like this

rule"temperature warning"
when Item boiler_temperature changed
then if (boiler_temperature.state > 50) {    //use your temperature
            temperature_warning.postUpdate("Warning high temperature!")
           }
else temperature_warning.postUpdate("temperature is OK")
end

Thank you, work perfectly,is possible change background color of the widget i use dummy widget to show the message. another things you can suggest a good guide to learn rule?

Here’s a search link that has several tutorials for design patterns and rule examples. Time of Day, Motion Sensor Timer, Group based Persistence, etc…

https://community.openhab.org/search?expanded=true&q=tags%3Adesignpattern

tnx