From this point I need your help, I want to compare the values and show the result by an icon.
The rule should be something like, if the indoor value is bigger than the outdoor so I need to open the window.
How is the setup to show the openhab Icon for a closed window and for a open window.
The window icon will dynamically change within the sitemap, depending on the state of the contact item.
rule "Compare humidity value"
when
Item afoutdoor received update or
Item afindoor received update
then
if(afindoor.state > afoutdoor.state){
OpenTheWindows.postUpdate(Open)
}
else{
OpenTheWindows.postUpdate(Closed)
}
end