Class: Domotics::Core::MotionSensor
- Defined in:
- lib/domotics/core/element/motion_sensor.rb
Instance Attribute Summary
Attributes inherited from Element
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ MotionSensor
constructor
A new instance of MotionSensor.
-
#set_state(*args) ⇒ Object
def to_hls(state) super == :on ? :move : :no_move end.
Methods inherited from Element
data=, #image, #info, #load_driver, #state, #state_changed, #to_s, #verbose_state
Constructor Details
#initialize(args = {}) ⇒ MotionSensor
Returns a new instance of MotionSensor.
3 4 5 6 7 8 |
# File 'lib/domotics/core/element/motion_sensor.rb', line 3 def initialize(args = {}) @type = args[:type] || :motion_sensor args[:driver] = "DigitalSensor" load_driver args super end |
Instance Method Details
#set_state(*args) ⇒ Object
def to_hls(state)
super == :on ? :move : :no_move
end
12 13 14 |
# File 'lib/domotics/core/element/motion_sensor.rb', line 12 def set_state(*args) nil end |