Hi, I’m thinking about switching over to openhab but i’m having some trouble figuring out the rules. I’m trying to create a simple sample rule to test things out. I just want to turn a light off at a specific time. I can control the light using a site map but I can’t figure out how to do it automatically.
I’m getting the following error in designer
Multiple markers at this line
- This expression is not allowed in this context, since it doesn’t
cause any side effects.
- no viable alternative at input ‘Item’
I’m pretty sure my problem is in the imports section but I don’t know what to put in there.
Below is the rule as it’s written in designer. I imported a whole bunch a stuff just to test but I can’t figure this out.
import org.joda.time.* import org.openhab.core.library.types.* import org.openhab.core.library.types.PercentType import org.openhab.core.library.items.SwitchItem import org.openhab.model.script.actions.* import org.openhab.model.script.actions.Timer rule "LightsOut" when Time cron "30 16 * * * ?" then Item Light_FF_Family_Ceiling OFF end
Can someone give me a hand?