Class: OpenHAB::Core::Types::UpDownType
- Inherits:
-
Object
- Object
- OpenHAB::Core::Types::UpDownType
- Defined in:
- lib/openhab/core/types/up_down_type.rb
Overview
Implements the UP and DOWN commands.
Also, PercentType can be converted to UpDownType
for more semantic comparisons. 0
is UP, 100
is
DOWN, and anything in-between is neither.
Constant Summary collapse
- UP =
Up Command/State
- DOWN =
Down Command/State
Instance Method Summary collapse
-
#! ⇒ UpDownType
Invert the type.
-
#down? ⇒ true, false
Check if
self == DOWN
. -
#up? ⇒ true, false
Check if
self == UP
.
Methods included from Type
Instance Method Details
#! ⇒ UpDownType
Invert the type
38 39 40 41 42 |
# File 'lib/openhab/core/types/up_down_type.rb', line 38 def ! return UP if down? DOWN if up? end |
#down? ⇒ true, false
Check if self == DOWN
|
# File 'lib/openhab/core/types/up_down_type.rb', line 29
|
#up? ⇒ true, false
Check if self == UP
|
# File 'lib/openhab/core/types/up_down_type.rb', line 25
|