OH2 Rules, Need Imports?

I’m trying to setup a rule in OH2 and wondering should you still be including the various imports at the beginning? I’m really even sure what they are used as i’m not an OH expert yet!

Are these needed in OH2 rules?

import org.openhab.core.library.types.*
import org.openhab.core.persistence.*
import org.openhab.model.script.actions.*
import java.util.Date

See https://github.com/openhab/openhab-distro/blob/master/docs/sources/migration.md#rules
Feel free to send PRs about any more specific information about which imports are still required or not to update this documentation.

This info has moved:


1 Like