class HueBulbState
Attributes
alert[RW]
bri[RW]
colormode[RW]
ct[RW]
effect[RW]
hue[RW]
on[RW]
reachable[RW]
sat[RW]
xy[RW]
Public Class Methods
new( data = {} )
click to toggle source
# File lib/rubyhue/huebulb.rb, line 25 def initialize( data = {} ) @on = data["on"] @bri = data["bri"] @hue = data["hue"] @sat = data["sat"] @xy = data["xy"] @ct = data["ct"] @alert = data["alert"] @effect = data["effect"] @colormode = data["colormode"] @reachable = data["reachable"] end
Public Instance Methods
bri=(value)
click to toggle source
# File lib/rubyhue/huebulb.rb, line 38 def bri=(value) if value > 254 STDERR.puts "Brightness value too big, no change." elsif value < 0 STDERR.puts "Brightness value too small, no change." else @bri = value end end
data()
click to toggle source
# File lib/rubyhue/huebulb.rb, line 48 def data { "on" => @on, "bri" => @bri, "hue" => @hue, "sat" => @sat, "xy" => @xy, "ct" => @ct, "alert" => @alert, "effect" => @effect, "colormode" => @colormode, "reachable" => @reachable } end