Class: Switchbot::PlugMini

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

Instance Method Summary collapse

Constructor Details

#initialize(client:, device_id:) ⇒ PlugMini

Returns a new instance of PlugMini.



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

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

Instance Method Details

#toggleObject



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

def toggle
  commands(command: 'toggle')
end