eclipse-archived / smarthome

Eclipse SmartHome™ project
https://www.eclipse.org/smarthome/
Eclipse Public License 2.0
862 stars 787 forks source link

[Automation - Feature request] Add ThingStatusChangedTrigger that also supports from <status> to <status> #6322

Open 5iver opened 5 years ago

5iver commented 5 years ago

The GenericEventTrigger currently supports Thing events, but the current OH Rules DSL also supports status changes.

lewie commented 5 years ago

Does a ChannelEventTrigger do what you mean?

openHAB JSR223 - jython: https://community.openhab.org/t/two-trigger-with-a-condition-each-in-one-single-rule/30225/16

openHAB JSR223 - javascript: https://github.com/lewie/openhab2-javascript/blob/master/jslib/triggersAndConditions.js#L75

5iver commented 5 years ago

Does a ChannelEventTrigger do what you mean?

Unfortunately, no. I'm looking for something like...

Thing kodi:kodi:familyroom changed to ONLINE

Without to ONLINE works with GenericEventTrigger. This request is to add a trigger for Things that includes the statuses. I don't have a specific need for it, but saw the gap in functionality compared to the Rules DSL. This was a standout use case while documenting these changes... https://github.com/OH-Jython-Scripters/openhab2-jython/pull/23.