rule "Update conditions for HABPanel icon selection"
when
Item LocalWeather_Current_Conditions_Formatted received update
then
if (TimeOfDay.state = "DAY") {
LocalWeather_Current_Conditions.postUpdate(transform("MAP", "weather_conditions_day.map", LocalWeather_Current_Conditions_Formatted.state.toString()))
} else if (TimeOfDay = "NIGHT" {
LocalWeather_Current_Conditions.postUpdate(transform("MAP", "weather_conditions_night.map", LocalWeather_Current_Conditions_Formatted.state.toString()))
}
end
For TimeOfDay, see: Design Pattern: Time Of Day