The first if statement in your rule is true when the time is before 7am (now.getHourOfDay < 7) or after 4pm (now.getHourOfDay > 15). Using 14.5 would make the latter time an hour earlier (3pm), since now.getHourOfDay returns an integer. So, remove the CurrentHour variable and compare times…