Module: RubyHue::Light::BasicState

Included in:
State, RubyHue::LightsCollectionState
Defined in:
lib/ruby_hue/light/basic_state.rb

Constant Summary collapse

MAPPING =
{
  on: :on,
  bri: :brightness,
  hue: :hue,
  sat: :saturation,
  xy: :xy,
  ct: :color_temperature,
  alert: :alert,
  effect: :effect,
  colormode: :color_mode,
  reachable: :reachable
}
IMMUTABLE_KEYS =
%w(colormode reachable)

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#stateObject



27
28
29
# File 'lib/ruby_hue/light/basic_state.rb', line 27

def state
  @state ||= {}
end

Instance Method Details

#updateable_stateObject



21
22
23
24
25
# File 'lib/ruby_hue/light/basic_state.rb', line 21

def updateable_state
  state.reject do |key, value|
    IMMUTABLE_KEYS.include? key
  end
end