Module: OpenHAB::Core::Items
- Defined in:
- lib/openhab/core/items.rb,
lib/openhab/core/items/item.rb,
lib/openhab/core/items/proxy.rb,
lib/openhab/core/items/metadata.rb,
lib/openhab/core/items/provider.rb,
lib/openhab/core/items/registry.rb,
lib/openhab/core/items/call_item.rb,
lib/openhab/core/items/semantics.rb,
lib/openhab/core/items/color_item.rb,
lib/openhab/core/items/group_item.rb,
lib/openhab/core/items/image_item.rb,
lib/openhab/core/items/dimmer_item.rb,
lib/openhab/core/items/number_item.rb,
lib/openhab/core/items/persistence.rb,
lib/openhab/core/items/player_item.rb,
lib/openhab/core/items/string_item.rb,
lib/openhab/core/items/switch_item.rb,
lib/openhab/core/items/contact_item.rb,
lib/openhab/core/items/generic_item.rb,
lib/openhab/core/items/numeric_item.rb,
lib/openhab/core/items/location_item.rb,
lib/openhab/core/items/metadata/hash.rb,
lib/openhab/core/items/state_storage.rb,
lib/openhab/core/items/date_time_item.rb,
lib/openhab/core/items/group_function.rb,
lib/openhab/core/items/metadata/provider.rb,
lib/openhab/core/items/item_channel_links.rb,
lib/openhab/core/items/rollershutter_item.rb,
lib/openhab/core/items/semantics/provider.rb,
lib/openhab/core/items/accepted_data_types.rb,
lib/openhab/core/items/semantics/semantic_tag.rb,
lib/openhab/core/items/metadata/namespace_hash.rb,
lib/openhab/core/items/semantics/tag_class_methods.rb
Overview
Contains the core types that openHAB uses to represent items. Items have states from the Types module.
You may use an item or group name anywhere DSL (or just EntityLookup) is available, and it will automatically be loaded.
Defined Under Namespace
Modules: GroupFunction, Item, Metadata, NumericItem, Persistence, Semantics Classes: CallItem, ColorItem, ContactItem, DateTimeItem, DimmerItem, GenericItem, GroupItem, ImageItem, ItemChannelLinks, LocationItem, NumberItem, PlayerItem, Provider, Registry, RollershutterItem, StateStorage, StringItem, SwitchItem
Class Method Summary collapse
-
.import_into_global_namespace ⇒ Object
Imports all of the item classes into the global namespace for convenient access.
Instance Method Summary collapse
-
#closed? ⇒ true, false
Check if the item state == CLOSED.
-
#fast_forward ⇒ PlayerItem
Send the FASTFORWARD command to the item.
-
#fast_forward! ⇒ PlayerItem
Send the FASTFORWARD command to the item, even when ensure_states! is in effect.
-
#fast_forwarding? ⇒ true, false
Check if the item state == FASTFORWARD.
-
#next ⇒ PlayerItem
Send the NEXT command to the item.
-
#open? ⇒ true, false
Check if the item state == OPEN.
-
#pause ⇒ PlayerItem
Send the PAUSE command to the item.
-
#pause! ⇒ PlayerItem
Send the PAUSE command to the item, even when ensure_states! is in effect.
-
#paused? ⇒ true, false
Check if the item state == PAUSE.
-
#play ⇒ PlayerItem
Send the PLAY command to the item.
-
#play! ⇒ PlayerItem
Send the PLAY command to the item, even when ensure_states! is in effect.
-
#play? ⇒ true, false
Check if the item state == PLAY.
-
#previous ⇒ PlayerItem
Send the PREVIOUS command to the item.
-
#rewind ⇒ PlayerItem
Send the REWIND command to the item.
-
#rewind! ⇒ PlayerItem
Send the REWIND command to the item, even when ensure_states! is in effect.
-
#rewinding? ⇒ true, false
Check if the item state == REWIND.
Class Method Details
.import_into_global_namespace ⇒ Object
Imports all of the item classes into the global namespace for convenient access.
22 23 24 25 26 27 28 29 |
# File 'lib/openhab/core/items.rb', line 22 def import_into_global_namespace concrete_item_classes.each do |k| const_name = k.java_class.simple_name Object.const_set(const_name, k) unless Object.const_defined?(const_name) end Object.const_set(:GenericItem, GenericItem) unless Object.const_defined?(:GenericItem) Object.const_set(:Item, Item) unless Object.const_defined?(:Item) end |
Instance Method Details
#closed? ⇒ true, false
Check if the item state == CLOSED
|
# File 'lib/openhab/core/items/contact_item.rb', line 41
|
#fast_forward ⇒ PlayerItem
Send the FASTFORWARD command to the item
|
# File 'lib/openhab/core/items/player_item.rb', line 62
|
#fast_forward! ⇒ PlayerItem
Send the FASTFORWARD command to the item, even when ensure_states! is in effect.
|
# File 'lib/openhab/core/items/player_item.rb', line 66
|
#fast_forwarding? ⇒ true, false
Check if the item state == FASTFORWARD
|
# File 'lib/openhab/core/items/player_item.rb', line 34
|
#next ⇒ PlayerItem
Send the NEXT command to the item
|
# File 'lib/openhab/core/items/player_item.rb', line 71
|
#open? ⇒ true, false
Check if the item state == OPEN
|
# File 'lib/openhab/core/items/contact_item.rb', line 34
|
#pause ⇒ PlayerItem
Send the PAUSE command to the item
|
# File 'lib/openhab/core/items/player_item.rb', line 46
|
#pause! ⇒ PlayerItem
Send the PAUSE command to the item, even when ensure_states! is in effect.
|
# File 'lib/openhab/core/items/player_item.rb', line 50
|
#paused? ⇒ true, false
Check if the item state == PAUSE
|
# File 'lib/openhab/core/items/player_item.rb', line 26
|
#play ⇒ PlayerItem
Send the PLAY command to the item
|
# File 'lib/openhab/core/items/player_item.rb', line 38
|
#play! ⇒ PlayerItem
Send the PLAY command to the item, even when ensure_states! is in effect.
|
# File 'lib/openhab/core/items/player_item.rb', line 42
|
#play? ⇒ true, false
Check if the item state == PLAY
|
# File 'lib/openhab/core/items/player_item.rb', line 22
|
#previous ⇒ PlayerItem
Send the PREVIOUS command to the item
|
# File 'lib/openhab/core/items/player_item.rb', line 75
|
#rewind ⇒ PlayerItem
Send the REWIND command to the item
|
# File 'lib/openhab/core/items/player_item.rb', line 54
|
#rewind! ⇒ PlayerItem
Send the REWIND command to the item, even when ensure_states! is in effect.
|
# File 'lib/openhab/core/items/player_item.rb', line 58
|
#rewinding? ⇒ true, false
Check if the item state == REWIND
|
# File 'lib/openhab/core/items/player_item.rb', line 30
|