-
Notifications
You must be signed in to change notification settings - Fork 480
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
Add initial support for Tornado 16X SQ air conditioner (0x4e2a) #430
Closed
Closed
Changes from 15 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
4fd2b16
Add GH Actions
KTibow ebaac1f
Fix branches
KTibow 97077d3
Conditionals
KTibow 25856e3
Update flake8.yaml
KTibow d09f501
Go back
KTibow 9482804
Update flake8.yaml
KTibow 153b96f
Update flake8.yaml
KTibow 922eb45
Run black
KTibow 75e483c
Clean up get_energy() (#471)
felipediel 1799a8c
Merge branch 'master' into patch-2
mjg59 29345a1
Merge pull request #470 from KTibow/patch-2
mjg59 5fcea48
Rebase from main.
enosh e16fe18
Simplify `set_advanced` to just one request and create `set_partial` …
enosh cfd2942
Fix modes heating,drying,fan when unit is powered off, in `set_partial`.
enosh ee3bb1f
Fix some bugs in set_advanced.
enosh 9913097
Better ifs. Fix flake8 issues.
enosh e245964
Rename `torando` class to `xsq`.
enosh 09527ae
Round target_temp.
enosh e999a79
Rename class to `sq1`, add clean and mildew support, use f-strings, _…
enosh 8f8c113
Handle checksums correctly!
enosh 692986e
Remove set_partial, integate to set_state (renamed from set_advanced)…
enosh db50704
Implement an encode func.
enosh e6d151a
replace some complicated ifs with {}.get
enosh 573de73
avoid struct in encode, more dict use instead of ifs
enosh e459581
typos, flake8 issues
enosh d0899e7
First attempt at IntEmun for mode, speed and swing. Simplify _encode.
enosh 85ef56d
Replace a bunch of type checks with creating a new instance.
enosh bb13719
Move packet creation to a new _send_command and to _enocde.
enosh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Python flake8 | ||
|
||
on: | ||
push: | ||
branches: [ main, master, dev, development ] | ||
pull_request: | ||
branches: [ main, master, dev, development ] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8, 3.9] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 wemake-python-styleguide | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. ignore magic numbers and use double quotes and ignore numbers with zeroes before them. | ||
# and ignore lowercase hex numbers and ignore isort incorrect imports | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=90 --ignore=WPS432,WPS339,WPS341,I --inline-quotes double --statistics |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We should consider naming the class with the model instead of the brand. Eventually Tornado will launch another device and we will have to create another class, and tornado_new is weird.
How about
top
orsqx
? We need to make the type short so we can keep the code clean eg here.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.
I have a "SMART-16X SQ (WIFI)" (the numbers change based on size). Reading through the catalogue there's also a TOP SQ WIFI __X series (which at some point I assumed were identical). Based on the app description both should work, but that is untested. So I renamed the class to
xsq
, does that work?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.
How does the model look like in the official app? If it looks specific (numbers included), the PIDs are different. If it looks generic, they are probably using the same PID for all these _X models.
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.
It's utterly generic, the most specific it gets is "Air-conditioner".
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.
@thewh1teagle What is your model?
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.
I think we should use
sq
orsq1
.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.
Sounds good, do you have a preference?
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.
I think
sq1
will look better if we need to create asq2
in the future. We can usesq1
for the class,SQ1
for the type andSQ
for the model name.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.
@felipediel Sorry for being late, my model is
SMART-12X SQ (WIFI)
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.
Thank you!