Class ScriptProfile
java.lang.Object
org.openhab.core.automation.module.script.profile.ScriptProfile
- All Implemented Interfaces:
Profile,StateProfile,TimeSeriesProfile
The
ScriptProfile is generic profile for managing values with scripts- Author:
- Jan N. Klug - Initial contribution
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionScriptProfile(ProfileTypeUID profileTypeUID, ProfileCallback callback, ProfileContext profileContext, TransformationService transformationService) -
Method Summary
Modifier and TypeMethodDescriptionGet theProfileTypeUIDof this profile.voidonCommandFromHandler(Command command) If a binding issued a command to a channel, this method will be called for each linked item.voidonCommandFromItem(Command command) Will be called if a command should be forwarded to the binding.voidonStateUpdateFromHandler(State state) If the binding indicated a state update on a channel, then this method will be called for each linked item.voidonStateUpdateFromItem(State state) Will be called if an item has changed its state and this information should be forwarded to the binding.voidonTimeSeriesFromHandler(TimeSeries timeSeries) If a binding sends a time-series to a channel, this method will be called for each linked item.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openhab.core.thing.profiles.StateProfile
onCommandFromItem
-
Field Details
-
CONFIG_TO_ITEM_SCRIPT
- See Also:
-
CONFIG_TO_HANDLER_SCRIPT
- See Also:
-
CONFIG_COMMAND_FROM_ITEM_SCRIPT
- See Also:
-
CONFIG_STATE_FROM_ITEM_SCRIPT
- See Also:
-
-
Constructor Details
-
ScriptProfile
public ScriptProfile(ProfileTypeUID profileTypeUID, ProfileCallback callback, ProfileContext profileContext, TransformationService transformationService)
-
-
Method Details
-
getProfileTypeUID
Description copied from interface:ProfileGet theProfileTypeUIDof this profile.- Specified by:
getProfileTypeUIDin interfaceProfile- Returns:
- the UID of the profile type
-
onStateUpdateFromItem
Description copied from interface:ProfileWill be called if an item has changed its state and this information should be forwarded to the binding.- Specified by:
onStateUpdateFromItemin interfaceProfile- Parameters:
state- the new state
-
onCommandFromItem
Description copied from interface:StateProfileWill be called if a command should be forwarded to the binding.- Specified by:
onCommandFromItemin interfaceStateProfile- Parameters:
command-
-
onCommandFromHandler
Description copied from interface:StateProfileIf a binding issued a command to a channel, this method will be called for each linked item.- Specified by:
onCommandFromHandlerin interfaceStateProfile- Parameters:
command-
-
onStateUpdateFromHandler
Description copied from interface:StateProfileIf the binding indicated a state update on a channel, then this method will be called for each linked item.- Specified by:
onStateUpdateFromHandlerin interfaceStateProfile- Parameters:
state-
-
onTimeSeriesFromHandler
Description copied from interface:TimeSeriesProfileIf a binding sends a time-series to a channel, this method will be called for each linked item.- Specified by:
onTimeSeriesFromHandlerin interfaceTimeSeriesProfile- Parameters:
timeSeries- the time-series
-