Skip to content
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

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

syssi
Copy link
Collaborator

@syssi syssi commented Dec 20, 2018

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',

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)


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',

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)

"""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',

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)

def status(self) -> AirConditionStatus:
"""Retrieve properties."""

properties = ['mode', 'lcd_auto', 'lcd_level', 'volume', 'idle_timer', 'open_timer', 'power', 'temp_dec',

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)

@coveralls
Copy link

coveralls commented Dec 20, 2018

Coverage Status

Coverage decreased (-1.4%) to 71.199% when pulling 99417af on syssi:feature/xiaomi-aircondition-support into 6db862d on rytilahti:master.

@syssi syssi changed the title Add basic Xiaomi Air Condition support WIP: Add basic Xiaomi Air Condition support Dec 20, 2018
return self.send("set_mode", [mode.value])

@command(
click.argument("seconds", type=int),

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)),

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),

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_ptc", ["off"])

@command(
click.argument("volume", type=bool),

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_silent", ["off"])

@command(
click.argument("ptc", type=bool),

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),

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),

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),

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),

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),

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_high", ["off"])


@command(

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants