Class: OpenHAB::Core::Items::RollershutterItem
- Inherits:
-
GenericItem
- Object
- GenericItem
- OpenHAB::Core::Items::RollershutterItem
- Includes:
- NumericItem
- Defined in:
- lib/openhab/core/items/rollershutter_item.rb
Overview
A RollershutterItem allows the control of roller shutters, i.e. moving them up, down, stopping or setting it to close to a certain percentage.
Constant Summary
Constants included from Semantics
Semantics::Equipment, Semantics::Location, Semantics::Point, Semantics::Property, Semantics::Tag
Instance Attribute Summary collapse
- #state ⇒ PercentType, ... readonly
Attributes inherited from GenericItem
#category, #formatted_state, #label, #name, #raw_state, #tags
Attributes included from Semantics
#equipment, #equipment_type, #location, #location_type, #point_type, #property_type, #semantic_type
Attributes included from Item
#accepted_command_types, #accepted_data_types, #all_groups, #groups, #metadata, #name
Instance Method Summary collapse
-
#down ⇒ RollershutterItem
Send the DOWN command to the item.
-
#down? ⇒ true, false
Check if the item state == DOWN.
-
#move ⇒ RollershutterItem
Send the MOVE command to the item.
-
#stop ⇒ RollershutterItem
Send the STOP command to the item.
-
#up ⇒ RollershutterItem
Send the UP command to the item.
-
#up? ⇒ true, false
Check if the item state == UP.
Methods inherited from GenericItem
#command, #modify, #null?, #refresh, #state?, #undef?, #update
Methods included from Semantics
#equipment?, #location?, #point?, #points, #semantic?
Methods included from Item
#inspect, #member_of?, #provider, #tagged?, #thing, #things, #to_s
Methods included from DSL::Items::TimedCommand
Methods included from Persistence
#average_between, #average_since, #changed_between?, #changed_since?, #count_between, #count_since, #count_state_changes_between, #count_state_changes_since, #delta_between, #delta_since, #deviation_between, #deviation_since, #evolution_rate, #historic_state, #last_update, #maximum_between, #maximum_since, #minimum_between, #minimum_since, #persist, #previous_state, #sum_between, #sum_since, #updated_between?, #updated_since?, #variance_between, #variance_since
Methods included from DSL::Items::Ensure::Ensurable
Instance Attribute Details
#state ⇒ PercentType, ... (readonly)
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/openhab/core/items/rollershutter_item.rb', line 29 class RollershutterItem < GenericItem include NumericItem # @!method up? # Check if the item state == {UP} # @return [true,false] # @!method down? # Check if the item state == {DOWN} # @return [true,false] # @!method up # Send the {UP} command to the item # @return [RollershutterItem] `self` # @!method down # Send the {DOWN} command to the item # @return [RollershutterItem] `self` # @!method stop # Send the {STOP} command to the item # @return [RollershutterItem] `self` # @!method move # Send the {MOVE} command to the item # @return [RollershutterItem] `self` # raw numbers translate directly to PercentType, not a DecimalType # @!visibility private def format_type(command) return Types::PercentType.new(command) if command.is_a?(Numeric) super end end |
Instance Method Details
#down ⇒ RollershutterItem
Send the DOWN command to the item
|
# File 'lib/openhab/core/items/rollershutter_item.rb', line 44
|
#down? ⇒ true, false
Check if the item state == DOWN
|
# File 'lib/openhab/core/items/rollershutter_item.rb', line 36
|
#move ⇒ RollershutterItem
Send the MOVE command to the item
|
# File 'lib/openhab/core/items/rollershutter_item.rb', line 52
|
#stop ⇒ RollershutterItem
Send the STOP command to the item
|
# File 'lib/openhab/core/items/rollershutter_item.rb', line 48
|
#up ⇒ RollershutterItem
Send the UP command to the item
|
# File 'lib/openhab/core/items/rollershutter_item.rb', line 40
|
#up? ⇒ true, false
Check if the item state == UP
|
# File 'lib/openhab/core/items/rollershutter_item.rb', line 32
|