Class: Switchbot::Humidifier
- Inherits:
-
Object
- Object
- Switchbot::Humidifier
- Extended by:
- Forwardable
- Defined in:
- lib/switchbot/humidifier.rb
Instance Method Summary collapse
- #auto ⇒ Object
- #high ⇒ Object
-
#initialize(client:, device_id:) ⇒ Humidifier
constructor
A new instance of Humidifier.
- #low ⇒ Object
- #medium ⇒ Object
- #mode(value) ⇒ Object
Constructor Details
#initialize(client:, device_id:) ⇒ Humidifier
Returns a new instance of Humidifier.
9 10 11 |
# File 'lib/switchbot/humidifier.rb', line 9 def initialize(client:, device_id:) @device = Device.new(client: client, device_id: device_id) end |
Instance Method Details
#auto ⇒ Object
17 18 19 |
# File 'lib/switchbot/humidifier.rb', line 17 def auto mode(:auto) end |
#high ⇒ Object
29 30 31 |
# File 'lib/switchbot/humidifier.rb', line 29 def high mode(103) end |
#low ⇒ Object
21 22 23 |
# File 'lib/switchbot/humidifier.rb', line 21 def low mode(101) end |
#medium ⇒ Object
25 26 27 |
# File 'lib/switchbot/humidifier.rb', line 25 def medium mode(102) end |
#mode(value) ⇒ Object
13 14 15 |
# File 'lib/switchbot/humidifier.rb', line 13 def mode(value) commands(command: 'setMode', parameter: value.to_s) end |