Hi,
I try to get more than one item in one row. I tried it with the following rule, but it don’t run. What is my mistake?
rule “wetter”
when
Item Temp_Min received update or
Item Temp_Max received update
then
wetteranzeige.postUpdate(Temp_Min.state.format(“%.1f”) +" °C / “+Temp_Max.state.format(”%.1f")+" °C")
end
Elaborate. Do you see a “-” in place of your string? Do you know if the rule is actually executing or not? Do you know that both Temp_Min and Temp_Max have valid values? Do you see any errors in your logs?
Yes, there is a “-” in place of the string. I used a cronjob which runs the rule every minute.
Something is going wrong with this rule, but what?
I found this entry in the logfile:
2016-04-10 11:48:01.041 [INFO ] [c.internal.ModelRepositoryImpl] - Refreshing model ‘wetter.rules’
2016-04-10 11:48:01.061 [WARN ] [c.internal.ModelRepositoryImpl] - Configuration model ‘wetter.rules’ is either empty or cannot be parsed correctly!
2016-04-10 11:48:01.062 [DEBUG] [c.internal.ModelRepositoryImpl] - Errors reported for ‘wetter.rules’:
wetter.rules has a syntax error in it that is preventing it from being loaded. I highly recommend loading it into Designer which will highlight and syntax errors for you.
The “-” indicates that that Item has not be initialized and is undefined.
I tried it without the °C, but got also the “-” only.
WIthib habmin I see that the rule has a failure, but as I’m a newbie I can’t understand it.
The line:
No. You can sometime cheat with labels by combining the text from two Items into a third Item using a rule, but you cannot have more than one icon per row.
However, if you want a more detailed weather presentation, look at the webview approach described at the bottom of the weather binding wiki page.