Class Things
java.lang.Object
org.openhab.core.model.script.actions.Things
This class provides static methods that can be used in automation rules for
getting thing's status info.
- Author:
- Maoliang Huang - Initial contribution, Kai Kreuzer - Extended for general thing access
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Thingget(ThingRegistry registry, String thingUid) Get aThingfrom theThingRegistry.static ThingActionsgetActions(String scope, String thingUid) Get the actions instance for a Thing of a given scopestatic ThingActionsgetActions(Thing thing, String scope) Gets the actions instance of a certain scope for a givenThing.static ThingStatusInfogetThingStatusInfo(String thingUid) Retrieves the status info of a Thing
-
Constructor Details
-
Things
public Things()
-
-
Method Details
-
getThingStatusInfo
Retrieves the status info of a Thing- Parameters:
thingUid- The uid of the thing- Returns:
ThingStatusInfo
-
getActions
Get the actions instance for a Thing of a given scope- Parameters:
scope- The action scopethingUid- The uid of the thing- Returns:
- the
ThingActionsinstance
-
getActions
Gets the actions instance of a certain scope for a givenThing.- Parameters:
thing- theThing.scope- the action scope.- Returns:
- The
ThingActionsinstance ornull.
-
get
Get aThingfrom theThingRegistry.- Parameters:
registry- theThingRegistry.thingUid- the Thing UID string.- Returns:
- The
Thinginstance ofnull.
-