Uses of Interface
org.openhab.core.types.State
Package
Description
-
Uses of State in org.openhab.core.automation.module.script.defaultscope
Modifier and TypeMethodDescriptionScriptBusEvent.storeStates
(Item @Nullable ... items) Stores the current states for a list of items in a map.Modifier and TypeMethodDescription@Nullable Object
ScriptBusEvent.postUpdate
(@Nullable Item item, @Nullable State state) Posts a status update for a specified item to the event bus.Modifier and TypeMethodDescription@Nullable Object
ScriptBusEvent.restoreStates
(@Nullable Map<Item, State> statesMap) Restores item states from a map.@Nullable Object
ScriptBusEvent.sendTimeSeries
(@Nullable String itemName, @Nullable Map<ZonedDateTime, State> values, String policy) Sends a time series to the event bus -
Uses of State in org.openhab.core.automation.module.script.profile
Modifier and TypeMethodDescriptionvoid
ScriptProfile.onStateUpdateFromHandler
(State state) void
ScriptProfile.onStateUpdateFromItem
(State state) -
Uses of State in org.openhab.core.items
Modifier and TypeMethodDescription<T extends State>
@Nullable TGenericItem.getStateAs
(Class<T> typeClass) <T extends State>
@Nullable TGroupFunction.Equality.getStateAs
(@Nullable Set<Item> items, Class<T> stateClass) <T extends State>
@Nullable TGroupFunction.getStateAs
(@Nullable Set<Item> items, Class<T> stateClass) Calculates the group state and returns it as a state of the requested type.<T extends State>
@Nullable TGroupItem.getStateAs
(Class<T> typeClass) <T extends State>
@Nullable TItem.getStateAs
(Class<T> typeClass) returns the current state of the item as a specific typeModifier and TypeMethodDescriptionDetermines the current state of a group based on a list of itemsItemStateConverter.convertToAcceptedState
(@Nullable State state, @Nullable Item item) State[]
GroupFunction.Equality.getParameters()
State[]
GroupFunction.getParameters()
Returns the parameters of the function as an array.GenericItem.getState()
Item.getState()
returns the current state of the itemModifier and TypeMethodDescriptionGroupItem.getAcceptedDataTypes()
The accepted data types of a group item is the same as of the underlying base item.Item.getAcceptedDataTypes()
This method provides a list of all data types that can be used to update the item stateModifier and TypeMethodDescriptionprotected final void
GenericItem.applyState
(State state) Sets new state, notifies listeners and sends events.ItemStateConverter.convertToAcceptedState
(@Nullable State state, @Nullable Item item) boolean
GenericItem.isAcceptedState
(List<Class<? extends State>> acceptedDataTypes, State state) Tests if state is within acceptedDataTypes list or a subclass of one of themprotected void
GenericItem.logSetTypeError
(State state) protected void
GenericItem.notifyListeners
(State oldState, State newState) void
Set a new state.void
void
GroupItem.stateChanged
(Item item, State oldState, State newState) void
StateChangeListener.stateChanged
(Item item, State oldState, State newState) This method is called, if a state has changed.void
GroupItem.stateUpdated
(Item item, State state) void
StateChangeListener.stateUpdated
(Item item, State state) This method is called, if a state was updated, but has not changedModifier and TypeMethodDescriptionboolean
GenericItem.isAcceptedState
(List<Class<? extends State>> acceptedDataTypes, State state) Tests if state is within acceptedDataTypes list or a subclass of one of them -
Uses of State in org.openhab.core.items.events
Modifier and TypeFieldDescriptionprotected final State
ItemStateChangedEvent.itemState
protected final State
ItemStateEvent.itemState
protected final State
ItemStateUpdatedEvent.itemState
protected final State
ItemStateChangedEvent.oldItemState
protected final State
ItemStatePredictedEvent.predictedState
Modifier and TypeMethodDescriptionItemStateChangedEvent.getItemState()
Gets the item state.ItemStateEvent.getItemState()
Gets the item state.ItemStateUpdatedEvent.getItemState()
Gets the item state.ItemStateChangedEvent.getOldItemState()
Gets the old item state.ItemStatePredictedEvent.getPredictedState()
Gets the predicted item state.Modifier and TypeMethodDescriptionstatic GroupItemStateChangedEvent
ItemEventFactory.createGroupStateChangedEvent
(String itemName, String memberName, State newState, State oldState) Creates a group item state changed event.static GroupStateUpdatedEvent
ItemEventFactory.createGroupStateUpdatedEvent
(String groupName, String member, State state, @Nullable String source) Creates a group item state updated event.static ItemStateChangedEvent
ItemEventFactory.createStateChangedEvent
(String itemName, State newState, State oldState) Creates an item state changed event.static ItemEvent
ItemEventFactory.createStateEvent
(String itemName, State state) Creates an item state event.static ItemStateEvent
ItemEventFactory.createStateEvent
(String itemName, State state, @Nullable String source) Creates an item state event.static ItemStatePredictedEvent
ItemEventFactory.createStatePredictedEvent
(String itemName, State state, boolean isConfirmation) Creates an item state predicted event.static ItemStateUpdatedEvent
ItemEventFactory.createStateUpdatedEvent
(String itemName, State state) Creates an item state updated event.static ItemStateUpdatedEvent
ItemEventFactory.createStateUpdatedEvent
(String itemName, State state, @Nullable String source) Creates an item state updated event.ModifierConstructorDescriptionprotected
GroupItemStateChangedEvent
(String topic, String payload, String itemName, String memberName, State newItemState, State oldItemState) protected
GroupStateUpdatedEvent
(String topic, String payload, String itemName, String memberName, State newItemState, @Nullable String source) protected
ItemStateChangedEvent
(String topic, String payload, String itemName, State newItemState, State oldItemState) Constructs a new item state changed event.protected
ItemStateEvent
(String topic, String payload, String itemName, State itemState, @Nullable String source) Constructs a new item state event.ItemStatePredictedEvent
(String topic, String payload, String itemName, State predictedState, boolean isConfirmation) Constructs a new item state predicted event.protected
ItemStateUpdatedEvent
(String topic, String payload, String itemName, State itemState, @Nullable String source) Constructs a new item state event. -
Uses of State in org.openhab.core.library.items
Modifier and TypeMethodDescription<T extends State>
@Nullable TStringItem.getStateAs
(Class<T> typeClass) Modifier and TypeMethodDescriptionCallItem.getAcceptedDataTypes()
ColorItem.getAcceptedDataTypes()
ContactItem.getAcceptedDataTypes()
DateTimeItem.getAcceptedDataTypes()
DimmerItem.getAcceptedDataTypes()
ImageItem.getAcceptedDataTypes()
LocationItem.getAcceptedDataTypes()
NumberItem.getAcceptedDataTypes()
PlayerItem.getAcceptedDataTypes()
RollershutterItem.getAcceptedDataTypes()
StringItem.getAcceptedDataTypes()
SwitchItem.getAcceptedDataTypes()
Modifier and TypeMethodDescriptionvoid
void
void
void
void
void
void
void
void
void
void
void
-
Uses of State in org.openhab.core.library.types
Modifier and TypeClassDescriptionclass
class
The decimal type uses a BigDecimal internally and thus can be used for integers, longs and floating point numbers alike.class
The HSBType is a complex type with constituents for hue, saturation and brightness and can be used for color items.enum
enum
class
The PercentType extends theDecimalType
by putting constraints for its value on top (0-100).enum
This type is used by thePlayerItem
.class
This type can be used for items that are dealing with GPS or location awareness functionality.class
QuantityType<T extends javax.measure.Quantity<T>>
The measure type extends DecimalType to handle physical unit measurementclass
This type can be used for all binary data such as images, documents, sounds etc.enum
This type is used by thePlayerItem
.class
This type can be used for items that are dealing with telephony functionality.class
enum
Modifier and TypeFieldDescriptionprotected final State
ArithmeticGroupFunction.And.activeState
protected final State
ArithmeticGroupFunction.Or.activeState
protected final State
ArithmeticGroupFunction.And.passiveState
protected final State
ArithmeticGroupFunction.Or.passiveState
Modifier and TypeMethodDescription<T extends State>
@Nullable T<T extends State>
@Nullable T<T extends State>
@Nullable T<T extends State>
@Nullable T<T extends State>
@Nullable T<U extends State>
@Nullable U<T extends State>
@Nullable Tprotected <T extends State>
@Nullable TDecimalType.defaultConversion
(@Nullable Class<T> target) <T extends State>
@Nullable TArithmeticGroupFunction.And.getStateAs
(@Nullable Set<Item> items, Class<T> stateClass) <T extends State>
@Nullable TArithmeticGroupFunction.Avg.getStateAs
(@Nullable Set<Item> items, Class<T> stateClass) <T extends State>
@Nullable TArithmeticGroupFunction.Count.getStateAs
(@Nullable Set<Item> items, Class<T> stateClass) <T extends State>
@Nullable TArithmeticGroupFunction.Max.getStateAs
(@Nullable Set<Item> items, Class<T> stateClass) <T extends State>
@Nullable TArithmeticGroupFunction.Min.getStateAs
(@Nullable Set<Item> items, Class<T> stateClass) <T extends State>
@Nullable TArithmeticGroupFunction.Or.getStateAs
(@Nullable Set<Item> items, Class<T> stateClass) <T extends State>
@Nullable TArithmeticGroupFunction.Sum.getStateAs
(@Nullable Set<Item> items, Class<T> stateClass) <T extends State>
@Nullable TDateTimeGroupFunction.Earliest.getStateAs
(@Nullable Set<Item> items, Class<T> stateClass) <T extends State>
@Nullable TDateTimeGroupFunction.Latest.getStateAs
(@Nullable Set<Item> items, Class<T> stateClass) <T extends State>
@Nullable TQuantityTypeArithmeticGroupFunction.DimensionalGroupFunction.getStateAs
(@Nullable Set<Item> items, Class<T> stateClass) Modifier and TypeMethodDescriptionState[]
ArithmeticGroupFunction.And.getParameters()
State[]
ArithmeticGroupFunction.Avg.getParameters()
State[]
ArithmeticGroupFunction.Count.getParameters()
State[]
ArithmeticGroupFunction.Max.getParameters()
State[]
ArithmeticGroupFunction.Min.getParameters()
State[]
ArithmeticGroupFunction.Or.getParameters()
State[]
ArithmeticGroupFunction.Sum.getParameters()
State[]
DateTimeGroupFunction.Earliest.getParameters()
State[]
DateTimeGroupFunction.Latest.getParameters()
State[]
QuantityTypeArithmeticGroupFunction.DimensionalGroupFunction.getParameters()
ModifierConstructorDescription -
Uses of State in org.openhab.core.magic.binding.handler
Modifier and TypeMethodDescriptionprotected void
MagicChattyThingHandler.updateState
(ChannelUID channelUID, State state) -
Uses of State in org.openhab.core.model.script.actions
Modifier and TypeMethodDescriptionBusEvent.storeStates
(Item... items) Stores the current states for a list of items in a map.Modifier and TypeMethodDescriptionstatic Object
BusEvent.postUpdate
(Item item, State state) Posts a status update for a specified item to the event bus.Modifier and TypeMethodDescriptionstatic Object
BusEvent.restoreStates
(Map<Item, State> statesMap) Restores item states from a map.static Object
BusEvent.sendTimeSeries
(@Nullable String itemName, @Nullable Map<ZonedDateTime, State> values, String policy) Sends a time series to the event bus -
Uses of State in org.openhab.core.model.script.scoping
-
Uses of State in org.openhab.core.persistence
Modifier and TypeMethodDescription@Nullable State
FilterCriteria.getState()
HistoricItem.getState()
returns the current state of the itemModifier and TypeMethodDescriptionvoid
ModifiablePersistenceService.store
(Item item, ZonedDateTime date, State state) Stores the historic item value.void
ModifiablePersistenceService.store
(Item item, ZonedDateTime date, State state, @Nullable String alias) Stores the historic item value under a specified alias. -
Uses of State in org.openhab.core.persistence.dto
-
Uses of State in org.openhab.core.thing.binding
Modifier and TypeMethodDescriptionvoid
ThingHandlerCallback.stateUpdated
(ChannelUID channelUID, State state) Informs about an updated state for a channel.protected void
BaseThingHandler.updateState
(String channelID, State state) Updates the state of the thing.protected void
BaseThingHandler.updateState
(ChannelUID channelUID, State state) Updates the state of the thing. -
Uses of State in org.openhab.core.thing.binding.generic
Modifier and TypeMethodDescription@Nullable State
ChannelValueConverterConfig.fixedValueToState
(String string) maps a user-defined string to a stateModifier and TypeMethodDescriptionChannelHandler.Factory.create
(Consumer<State> updateState, Consumer<Command> postCommand, @Nullable Consumer<String> sendHttpValue, ChannelTransformation stateTransformations, ChannelTransformation commandTransformations, ChannelValueConverterConfig channelConfig) -
Uses of State in org.openhab.core.thing.binding.generic.converter
Modifier and TypeMethodDescriptionModifierConstructorDescriptionColorChannelHandler
(Consumer<State> updateState, Consumer<Command> postCommand, @Nullable Consumer<String> sendValue, ChannelTransformation stateTransformations, ChannelTransformation commandTransformations, ChannelValueConverterConfig channelConfig) DimmerChannelHandler
(Consumer<State> updateState, Consumer<Command> postCommand, @Nullable Consumer<String> sendValue, ChannelTransformation stateTransformations, ChannelTransformation commandTransformations, ChannelValueConverterConfig channelConfig) FixedValueMappingChannelHandler
(Consumer<State> updateState, Consumer<Command> postCommand, @Nullable Consumer<String> sendValue, ChannelTransformation stateTransformations, ChannelTransformation commandTransformations, ChannelValueConverterConfig channelConfig) GenericChannelHandler
(Function<String, State> toState, Consumer<State> updateState, Consumer<Command> postCommand, @Nullable Consumer<String> sendValue, ChannelTransformation stateTransformations, ChannelTransformation commandTransformations, ChannelValueConverterConfig channelConfig) GenericChannelHandler
(Function<String, State> toState, Consumer<State> updateState, Consumer<Command> postCommand, @Nullable Consumer<String> sendValue, ChannelTransformation stateTransformations, ChannelTransformation commandTransformations, ChannelValueConverterConfig channelConfig) ImageChannelHandler
(Consumer<State> updateState) NumberChannelHandler
(Consumer<State> updateState, Consumer<Command> postCommand, @Nullable Consumer<String> sendValue, ChannelTransformation stateTransformations, ChannelTransformation commandTransformations, ChannelValueConverterConfig channelConfig) PlayerChannelHandler
(Consumer<State> updateState, Consumer<Command> postCommand, @Nullable Consumer<String> sendValue, ChannelTransformation stateTransformations, ChannelTransformation commandTransformations, ChannelValueConverterConfig channelConfig) RollershutterChannelHandler
(Consumer<State> updateState, Consumer<Command> postCommand, @Nullable Consumer<String> sendValue, ChannelTransformation stateTransformations, ChannelTransformation commandTransformations, ChannelValueConverterConfig channelConfig) -
Uses of State in org.openhab.core.thing.profiles
Modifier and TypeMethodDescriptionProfileContext.getAcceptedDataTypes()
Get the list of accepted data types for state updates to the linked item This is an optional method and will return an empty list if not implemented.Modifier and TypeMethodDescriptionvoid
StateProfile.onStateUpdateFromHandler
(State state) If the binding indicated a state update on a channel, then this method will be called for each linked item.void
Profile.onStateUpdateFromItem
(State state) Will be called if an item has changed its state and this information should be forwarded to the binding.void
ProfileCallback.sendUpdate
(State state) Send a state update to the framework. -
Uses of State in org.openhab.core.types
Modifier and TypeClassDescriptionenum
There are situations when item states do not have any defined value.Modifier and TypeMethodDescriptiondefault <T extends @Nullable State>
@Nullable TConvert thisState
's value into another typeModifier and TypeMethodDescriptionstatic @Nullable State
TypeParser.parseState
(List<Class<? extends State>> types, String s) Determines a state from a string.TimeSeries.Entry.state()
Returns the value of thestate
record component.Modifier and TypeMethodDescriptionvoid
Add a new element to this series. -
Uses of State in org.openhab.core.ui.items
Modifier and TypeMethodDescription@Nullable State
ItemUIRegistry.convertState
(Widget widget, Item item, State state) Convert the given state into@Nullable State
ItemUIRegistry.convertStateToLabelUnit
(QuantityType<?> state, String label) Convert the given state to the unit found in label.@Nullable State
ItemUIRegistry.getItemState
(String itemName) Gets the item state@Nullable State
Retrieves the current state of the item of a widget orUnDefType.UNDEF
.Modifier and TypeMethodDescription@Nullable State
ItemUIRegistry.convertState
(Widget widget, Item item, State state) Convert the given state into