Class: OpenHAB::Core::Types::OnOffType
- Inherits:
-
Object
- Object
- OpenHAB::Core::Types::OnOffType
- Defined in:
- lib/openhab/core/types/on_off_type.rb
Overview
Constant Summary collapse
- ON =
On Command/State
- OFF =
Off Command/State
Instance Method Summary collapse
-
#! ⇒ OnOffType
Invert the type.
-
#off? ⇒ true, false
Check if
self == OFF
. -
#on? ⇒ true, false
Check if
self == ON
.
Methods included from Type
Instance Method Details
#! ⇒ OnOffType
Invert the type
35 36 37 |
# File 'lib/openhab/core/types/on_off_type.rb', line 35 def ! on? ? OFF : ON end |
#off? ⇒ true, false
Check if self == OFF
|
# File 'lib/openhab/core/types/on_off_type.rb', line 29
|
#on? ⇒ true, false
Check if self == ON
|
# File 'lib/openhab/core/types/on_off_type.rb', line 25
|