-
-
Notifications
You must be signed in to change notification settings - Fork 558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Add basic Xiaomi Air Condition support #439
base: master
Are you sure you want to change the base?
WIP: Add basic Xiaomi Air Condition support #439
Conversation
miio/aircondition.py
Outdated
properties = ['mode', 'lcd_auto', 'lcd_level', 'volume', 'idle_timer', 'open_timer', 'power', 'temp_dec', | ||
'st_temp_dec', 'speed_level', 'vertical_swing', 'ptc', 'ptc_rt', 'silent', 'vertical_end', | ||
'vertical_rt', 'speed_level', 'vertical_swing', 'comfort', 'ot_run_temp', 'ep_temp', 'es_temp', | ||
'he_temp', 'compressor_frq', 'motor_speed', 'humidity', 'ele_quantity', 'ex_humidity', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (108 > 100 characters)
miio/aircondition.py
Outdated
|
||
properties = ['mode', 'lcd_auto', 'lcd_level', 'volume', 'idle_timer', 'open_timer', 'power', 'temp_dec', | ||
'st_temp_dec', 'speed_level', 'vertical_swing', 'ptc', 'ptc_rt', 'silent', 'vertical_end', | ||
'vertical_rt', 'speed_level', 'vertical_swing', 'comfort', 'ot_run_temp', 'ep_temp', 'es_temp', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (117 > 100 characters)
miio/aircondition.py
Outdated
"""Retrieve properties.""" | ||
|
||
properties = ['mode', 'lcd_auto', 'lcd_level', 'volume', 'idle_timer', 'open_timer', 'power', 'temp_dec', | ||
'st_temp_dec', 'speed_level', 'vertical_swing', 'ptc', 'ptc_rt', 'silent', 'vertical_end', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (112 > 100 characters)
miio/aircondition.py
Outdated
def status(self) -> AirConditionStatus: | ||
"""Retrieve properties.""" | ||
|
||
properties = ['mode', 'lcd_auto', 'lcd_level', 'volume', 'idle_timer', 'open_timer', 'power', 'temp_dec', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (113 > 100 characters)
return self.send("set_mode", [mode.value]) | ||
|
||
@command( | ||
click.argument("seconds", type=int), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undefined name 'click'
return self.send("set_lcd", [brightness]) | ||
|
||
@command( | ||
click.argument("mode", type=EnumType(OperationMode, False)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undefined name 'click'
return self.send("set_volume_sw", ["on"]) | ||
|
||
@command( | ||
click.argument("brightness", type=int), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undefined name 'click'
miio/aircondition.py
Outdated
return self.send("set_ptc", ["off"]) | ||
|
||
@command( | ||
click.argument("volume", type=bool), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undefined name 'click'
miio/aircondition.py
Outdated
return self.send("set_silent", ["off"]) | ||
|
||
@command( | ||
click.argument("ptc", type=bool), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undefined name 'click'
return self.send("set_ver_range", [start, stop]) | ||
|
||
@command( | ||
click.argument("swing", type=bool), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undefined name 'click'
|
||
@command( | ||
click.argument("start", type=int), | ||
click.argument("stop", type=int), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undefined name 'click'
return self.send("set_spd_level", [speed]) | ||
|
||
@command( | ||
click.argument("start", type=int), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undefined name 'click'
return self.send("set_temperature", [int(temperature * 10)]) | ||
|
||
@command( | ||
click.argument("speed", type=int), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undefined name 'click'
return self.send("set_power", ["off"]) | ||
|
||
@command( | ||
click.argument("temperature", type=float), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undefined name 'click'
miio/aircondition.py
Outdated
return self.send("set_spd_high", ["off"]) | ||
|
||
|
||
@command( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too many blank lines (2)
syssi/xiaomi_airconditioningcompanion#39