Class: MideaAirCondition::Command::Set
Overview
Request status of a device
Instance Method Summary
collapse
Methods inherited from BaseCommand
#finalize, #initialize
Instance Method Details
#fan_speed(speed) ⇒ Object
20
21
22
|
# File 'lib/commands/set.rb', line 20
def fan_speed(speed)
@data[0x0d] = speed
end
|
#temperature(celsius, mode: 2) ⇒ Object
15
16
17
18
|
# File 'lib/commands/set.rb', line 15
def temperature(celsius, mode: 2)
c = ((mode << 5) & 0xe0) | (celsius & 0xf) | ((celsius << 4) & 0x10)
@data[0x0c] = c
end
|
#turn_off ⇒ Object
11
12
13
|
# File 'lib/commands/set.rb', line 11
def turn_off
@data[0x0b] = 0x42
end
|
#turn_on ⇒ Object
7
8
9
|
# File 'lib/commands/set.rb', line 7
def turn_on
@data[0x0b] = 0x43
end
|