Class: Switchbot::Light

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/switchbot/light.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:, device_id:) ⇒ Light

Returns a new instance of Light.



9
10
11
# File 'lib/switchbot/light.rb', line 9

def initialize(client:, device_id:)
  @device = Device.new(client: client, device_id: device_id)
end

Instance Method Details

#brightness_downObject



17
18
19
# File 'lib/switchbot/light.rb', line 17

def brightness_down
  commands(command: 'brightnessDown')
end

#brightness_upObject



13
14
15
# File 'lib/switchbot/light.rb', line 13

def brightness_up
  commands(command: 'brightnessUp')
end