Class ContactItem
- All Implemented Interfaces:
- Identifiable<String>,- ActiveItem,- Item
- Author:
- Kai Kreuzer - Initial contribution
- 
Field SummaryFields inherited from class org.openhab.core.items.GenericItemcategory, eventPublisher, groupNames, itemStateConverter, label, lastState, lastStateChange, lastStateUpdate, listeners, name, state, tags, timeSeriesListeners, type
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionThis method provides a list of all command types that can be used for this itemThis method provides a list of all data types that can be used to update the item state@Nullable CommandDescriptiongetCommandDescription(@Nullable Locale locale) Returns theCommandDescriptionfor the given locale.voidSet a new state.voidsetTimeSeries(TimeSeries timeSeries) Set a new time series.Methods inherited from class org.openhab.core.items.GenericItemaddGroupName, addGroupNames, addGroupNames, addStateChangeListener, addTag, addTags, addTags, addTimeSeriesListener, applyState, applyTimeSeries, dispose, equals, getCategory, getCommandOptions, getGroupNames, getLabel, getLastState, getLastStateChange, getLastStateUpdate, getName, getState, getStateAs, getStateDescription, getStateDescription, getTags, getType, getUID, hashCode, hasTag, internalSend, isAcceptedState, logSetTypeError, logSetTypeError, notifyListeners, removeAllTags, removeGroupName, removeStateChangeListener, removeTag, removeTimeSeriesListener, send, send, setCategory, setCommandDescriptionService, setEventPublisher, setItemStateConverter, setLabel, setState, setState, setStateDescriptionService, toStringMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.openhab.core.items.ItemgetCommandDescription
- 
Constructor Details- 
ContactItem
 
- 
- 
Method Details- 
getAcceptedDataTypesDescription copied from interface:ItemThis method provides a list of all data types that can be used to update the item state Imagine e.g. a dimmer device: It's status could be 0%, 10%, 50%, 100%, but also OFF or ON and maybe UNDEFINED. So the accepted data types would be in this case PercentType, andUnDefTypeThe order of data types denotes the order of preference. So in case a state needs to be converted in order to be accepted, it will be attempted to convert it to a type from top to bottom. Therefore the type with the least information loss should be on top of the list - in the example above the PercentTypecarries more information than the , hence it is listed first.- Returns:
- a list of data types that can be used to update the item state
 
- 
getAcceptedCommandTypesDescription copied from interface:ItemThis method provides a list of all command types that can be used for this item Imagine e.g. a dimmer device: You could ask it to dim to 0%, 10%, 50%, 100%, but also to turn OFF or ON. So the accepted command types would be in this case PercentType,- Returns:
- a list of all command types that can be used for this item
 
- 
setStateDescription copied from class:GenericItemSet a new state. Subclasses may override this method in order to do necessary conversions upfront. Afterwards,GenericItem.applyState(State, String)should be called by classes overriding this method.- Overrides:
- setStatein class- GenericItem
- Parameters:
- state- new state of this item
- source- the source of the state update. See https://www.openhab.org/docs/developer/utils/events.html#the-core-events
 
- 
setTimeSeriesDescription copied from class:GenericItemSet a new time series. Subclasses may override this method in order to do necessary conversions upfront. Afterwards,GenericItem.applyTimeSeries(TimeSeries)should be called by classes overriding this method. A time series may only contain events that are compatible with the item's internal state.- Overrides:
- setTimeSeriesin class- GenericItem
- Parameters:
- timeSeries- new time series of this item
 
- 
getCommandDescriptionDescription copied from interface:ItemReturns theCommandDescriptionfor the given locale. In case no dedicatedCommandDescriptionis provided theStateOptions from theStateDescriptionwill be served as validCommandOptions.- Specified by:
- getCommandDescriptionin interface- Item
- Overrides:
- getCommandDescriptionin class- GenericItem
- Parameters:
- locale- locale (can be null)
- Returns:
- command description (can be null)
 
 
-