Module: Hue::EditableState

Included in:
Group, Light
Defined in:
lib/hue/editable_state.rb

Instance Method Summary collapse

Instance Method Details

#off!Object


11
12
13
# File 'lib/hue/editable_state.rb', line 11

def off!
  self.on = false
end

#on!Object


7
8
9
# File 'lib/hue/editable_state.rb', line 7

def on!
  self.on = true
end

#on?Boolean

Returns:

  • (Boolean)

3
4
5
# File 'lib/hue/editable_state.rb', line 3

def on?
  @state['on']
end

#set_xy(x, y) ⇒ Object


22
23
24
25
# File 'lib/hue/editable_state.rb', line 22

def set_xy(x, y)
  set_state({:xy => [x, y]})
  @x, @y = x, y
end