-
-
Notifications
You must be signed in to change notification settings - Fork 563
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
Extended Air Conditioning Companion support #169
Conversation
1 similar comment
miio/airconditioningcompanion.py
Outdated
configuration = configuration.replace('mo', operation_mode.value) | ||
configuration = configuration.replace('wi', fan_speed.value) | ||
configuration = configuration.replace('sw', swing_mode.value) | ||
configuration = configuration.replace('tt', hex(int(target_temperature))[2:]) |
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 (85 > 79 characters)
miio/airconditioningcompanion.py
Outdated
swing_mode: SwingMode): | ||
|
||
# Static turn off command available? | ||
if (power == False) and (model in DEVICE_COMMAND_PRESETS) and \ |
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.
comparison to False should be 'if cond is False:' or 'if not cond:'
if model in DEVICE_COMMAND_TEMPLATES: | ||
configuration = model + DEVICE_COMMAND_TEMPLATES[model]['base'] | ||
else: | ||
configuration = model + DEVICE_COMMAND_TEMPLATES['fallback']['base'] |
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 (80 > 79 characters)
miio/airconditioningcompanion.py
Outdated
else: | ||
configuration = model + DEVICE_COMMAND_TEMPLATES['fallback']['base'] | ||
|
||
configuration = configuration.replace('po', power.value) |
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.
Just a suggestion, would it be better to replace placeholders with something like [PO]
to make it more clear that they are placeholders? Just a thought though, otherwise this seems fine to me so please feel to merge when you want.
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.
Good point!
}, | ||
'0100010727': { | ||
'deviceType': 'gree_2', | ||
'base': '[po][mo][wi][sw][tt]1100190[tt1]205002102000t7t0190[tt1]207002000000[tt4]0', |
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 (93 > 79 characters)
POWER_OFF = 'off' | ||
|
||
# Command templates per model number (f.e. 0180111111) | ||
# [po], [mo], [wi], [sw], [tt], [tt1], [tt4] and [tt7] are markers which will be replaced |
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 (89 > 79 characters)
No description provided.