openhab-scripters / openhab-helper-libraries

Scripts and modules for use with openHAB
Eclipse Public License 1.0
88 stars 69 forks source link

[events] Fix imports and start API update #254

Closed 5iver closed 4 years ago

5iver commented 4 years ago

core.osgi.events.OsgiEventTrigger has not yet been migrated to the newer automation API using TriggerBuilder. This begins the move, but the 100_OsgiEventTrigger.py component script will also need updating. I will include that in a future PR, along with changes to core.triggers to fix ItemRegistryEventTrigger and DirectoryEventTrigger and utilize them in when. There may be a better way to implement some of these triggers though, using ItemAddedEvent and ItemUpdatedEvent.

This PR also fixes the imports that inadvertently got messed up in #250 . This is a very interesting fix too, as it reveals how to access the objects brought in by using scriptExtensions in a module.

Signed-off-by: Scott Rushworth openhab@5iver.com