Resolved - [HELP] Script Structure

From the rule below I’m attempting to reset a number of switches that I use within other rules. I’m no coder and just try to manipulate what other people have done to make things work for me. So some of my ideas will no doubt be totally wrong, but we’re all here to learn as openHAB grows.

The simple idea behind the rule below was to reset a few switch that I’m using within other rules. As you can see I’m the rule runs when the Time_Of_Day item changes and then only if it’s MORNING. This was working fine over the winter, however as we approach summer it’s not working.

I’m using the Design Pattern to obtain my Time_Of_Day variable. MORNING starts at 6am, however because it’s not lighter at this time my Time_Of_Day skips MORNING and goes straight to DAY. Which isn’t a problem so long as I factor this into the rule.

rule "Good Morning"

when
	Item Time_Of_Day changed 
then
	if(Time_Of_Day.state == "MORNING") {
		postUpdate(In_Bed_Status, "No")
		postUpdate(Ciaron_Has_Arrived_Home, "No")
		postUpdate(Morning_Announced, "No")
	}
end

How do I change my if statement so that I can run the rule when the Time_Of_Day is either MORNING or DAY?

As always, thanks for your assistance.

Garry

rule "Good Morning"

when
	Item Time_Of_Day changed 
then
	if(Time_Of_Day.state == "MORNING" || Time_Of_Day == "DAY") {
		postUpdate(In_Bed_Status, "No")
		postUpdate(Ciaron_Has_Arrived_Home, "No")
		postUpdate(Morning_Announced, "No")
	}
end

Thanks @vzorglub that’s far to easy. :smiley: