Skip to content

Commit ea2cefc

Browse files
authored
Merge branch 'main' into japan-toshiba
2 parents ac57004 + ea90491 commit ea2cefc

File tree

112 files changed

+3640
-1042
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+3640
-1042
lines changed

.devcontainer/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
FROM mcr.microsoft.com/devcontainers/python:1-3.11
22

3+
# [Option] Install Node.js
4+
ARG INSTALL_NODE="true"
5+
ARG NODE_VERSION="lts/*"
6+
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
37

48
# Install Python dependencies from requirements
59
COPY requirements*.txt /tmp/pip-tmp/

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
github: [rokam, chemelli74, wuwentao, Necroneco]

.github/workflows/lint-pr.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ jobs:
1616
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1717
label-pr:
1818
runs-on: ubuntu-latest
19+
if: "!contains( github.event.pull_request.labels.*.name, 'autorelease: pending') && !contains( github.event.pull_request.labels.*.name, 'autorelease: tagged')"
1920
permissions:
21+
contents: read
2022
pull-requests: write
2123
steps:
2224
- uses: grafana/pr-labeler-action@v0.1.0

.github/workflows/python-build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v4
15-
- uses: wagoid/commitlint-github-action@v6.0.1
15+
- uses: wagoid/commitlint-github-action@v6.1.2
16+
with:
17+
configFile: .commitlint.config.mjs
1618
build:
1719
needs:
1820
- commitlint

.github/workflows/python-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
- name: Build package
5656
run: python -m build
5757
- name: Publish package
58-
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0
58+
uses: pypa/gh-action-pypi-publish@f7600683efdcb7656dec5b29656edb7bc586e597
5959
with:
6060
user: __token__
6161
password: ${{ secrets.PYPI_API_TOKEN }}

.pre-commit-config.yaml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# See https://pre-commit.com for more information
22
# See https://pre-commit.com/hooks.html for more hooks
33
exclude: "CHANGELOG.md|.copier-answers.yml"
4-
default_stages: [commit]
4+
default_stages: [pre-commit]
55

66
ci:
77
autofix_commit_msg: "chore(pre-commit.ci): auto fixes"
@@ -11,37 +11,39 @@ ci:
1111

1212
repos:
1313
- repo: https://github.com/pre-commit/pre-commit-hooks
14-
rev: v4.6.0
14+
rev: v5.0.0
1515
hooks:
1616
- id: no-commit-to-branch
1717
args: ["--branch", "main"]
18+
- id: check-json
19+
- id: check-toml
20+
- id: check-xml
21+
- id: check-yaml
22+
- id: detect-private-key
1823
- repo: https://github.com/astral-sh/ruff-pre-commit
19-
rev: v0.5.4
24+
rev: v0.6.9
2025
hooks:
2126
- id: ruff
2227
args:
2328
- --fix
2429
- id: ruff-format
2530
- repo: https://github.com/commitizen-tools/commitizen
26-
rev: v3.28.0
31+
rev: v3.29.1
2732
hooks:
2833
- id: commitizen
2934
stages: [commit-msg]
30-
- repo: https://github.com/pre-commit/pre-commit-hooks
31-
rev: v4.6.0
35+
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
36+
rev: v9.18.0
3237
hooks:
33-
- id: check-json
34-
- id: check-toml
35-
- id: check-xml
36-
- id: check-yaml
37-
- id: detect-private-key
38+
- id: commitlint
39+
stages: [commit-msg]
3840
- repo: https://github.com/pre-commit/mirrors-prettier
3941
rev: v4.0.0-alpha.8
4042
hooks:
4143
- id: prettier
4244
args: ["--tab-width", "2"]
4345
- repo: https://github.com/asottile/pyupgrade
44-
rev: v3.16.0
46+
rev: v3.18.0
4547
hooks:
4648
- id: pyupgrade
4749
args: [--py37-plus]

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
"type": "pickString",
9898
"options": [
9999
"美的美居",
100-
"MSmartHome",
100+
"SmartHome",
101101
"Midea Air",
102102
"NetHome Plus",
103103
"Ariston Clima"

CHANGELOG.md

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,149 @@
11
# Changelog
22

3+
## [6.0.3](https://github.com/rokam/midea-local/compare/v6.0.2...v6.0.3) (2024-10-15)
4+
5+
6+
### Bug Fixes
7+
8+
* cleanup and complete body and subbody types lists ([#325](https://github.com/rokam/midea-local/issues/325)) ([914dcb8](https://github.com/rokam/midea-local/commit/914dcb8098efe50cc1583ad81fd22b49e9e2536b))
9+
10+
## [6.0.2](https://github.com/rokam/midea-local/compare/v6.0.1...v6.0.2) (2024-10-08)
11+
12+
13+
### Bug Fixes
14+
15+
* add more BodyType ([#321](https://github.com/rokam/midea-local/issues/321)) ([a1b4ac8](https://github.com/rokam/midea-local/commit/a1b4ac807e3b475f0a32f44c0f1d7af980d7a486))
16+
17+
## [6.0.1](https://github.com/rokam/midea-local/compare/v6.0.0...v6.0.1) (2024-10-06)
18+
19+
20+
### Bug Fixes
21+
22+
* add missing body_type "163" ([#317](https://github.com/rokam/midea-local/issues/317)) ([45f7bd2](https://github.com/rokam/midea-local/commit/45f7bd2432a04fb69c9fdb9b6204de7eac87aa2e))
23+
* message protocol version default ([#316](https://github.com/rokam/midea-local/issues/316)) ([2f4e5d1](https://github.com/rokam/midea-local/commit/2f4e5d1d1335696cc3a179a67cf287eef54b6864))
24+
* protocol check in B6 devices ([#320](https://github.com/rokam/midea-local/issues/320)) ([55659c1](https://github.com/rokam/midea-local/commit/55659c19a642fadfd37aee32fbeae76e48aed3dd))
25+
26+
## [6.0.0](https://github.com/rokam/midea-local/compare/v5.0.0...v6.0.0) (2024-10-03)
27+
28+
29+
### ⚠ BREAKING CHANGES
30+
31+
* **cloud:** rename MSmartHome ([#306](https://github.com/rokam/midea-local/issues/306))
32+
33+
### Miscellaneous Chores
34+
35+
* **cloud:** rename MSmartHome ([#306](https://github.com/rokam/midea-local/issues/306)) ([20c796e](https://github.com/rokam/midea-local/commit/20c796eb9f9728ff4042f3caf2e0ff11012e12f5)), closes [#286](https://github.com/rokam/midea-local/issues/286)
36+
37+
## [5.0.0](https://github.com/rokam/midea-local/compare/v4.0.0...v5.0.0) (2024-10-02)
38+
39+
40+
### ⚠ BREAKING CHANGES
41+
42+
* **device:** rollback and socket refresh_status ([#307](https://github.com/rokam/midea-local/issues/307))
43+
44+
### Bug Fixes
45+
46+
* **device:** rollback and socket refresh_status ([#307](https://github.com/rokam/midea-local/issues/307)) ([f65b6ac](https://github.com/rokam/midea-local/commit/f65b6ac8fcc8ff2ae7085068498b96066213b658))
47+
48+
## [4.0.0](https://github.com/rokam/midea-local/compare/v3.0.1...v4.0.0) (2024-09-29)
49+
50+
51+
### ⚠ BREAKING CHANGES
52+
53+
* **device:** rollback and improve send/recv socket exception ([#304](https://github.com/rokam/midea-local/issues/304))
54+
55+
### Bug Fixes
56+
57+
* **device:** rollback and improve send/recv socket exception ([#304](https://github.com/rokam/midea-local/issues/304)) ([7083464](https://github.com/rokam/midea-local/commit/7083464bba91e2f341d09de3b90b6bc77ccac9cb))
58+
59+
## [3.0.1](https://github.com/rokam/midea-local/compare/v3.0.0...v3.0.1) (2024-09-21)
60+
61+
62+
### Bug Fixes
63+
64+
* **device:** prevent while true loop high cpu usage bug ([#298](https://github.com/rokam/midea-local/issues/298)) ([3bdec5c](https://github.com/rokam/midea-local/commit/3bdec5cbbad960d4fbc5b9a5520fa7c9219fe405))
65+
66+
## [3.0.0](https://github.com/rokam/midea-local/compare/v2.7.1...v3.0.0) (2024-09-20)
67+
68+
69+
### ⚠ BREAKING CHANGES
70+
71+
* **device:** socket exception and process rebuild ([#296](https://github.com/rokam/midea-local/issues/296))
72+
73+
### Bug Fixes
74+
75+
* **device:** socket exception and process rebuild ([#296](https://github.com/rokam/midea-local/issues/296)) ([7f2e572](https://github.com/rokam/midea-local/commit/7f2e57294802d6ecae64618d28d1659465077672))
76+
77+
## [2.7.1](https://github.com/rokam/midea-local/compare/v2.7.0...v2.7.1) (2024-09-12)
78+
79+
80+
### Bug Fixes
81+
82+
* ed device power/lock return message set and body_type 0x15 parse ([#284](https://github.com/rokam/midea-local/issues/284)) ([d9d4fac](https://github.com/rokam/midea-local/commit/d9d4faca3bf7a3096f1e12a53dd5953b79f2a422))
83+
84+
## [2.7.0](https://github.com/rokam/midea-local/compare/v2.6.3...v2.7.0) (2024-08-21)
85+
86+
87+
### Features
88+
89+
* **cli:** use of preset account if cloud info missing ([#278](https://github.com/rokam/midea-local/issues/278)) ([84293bf](https://github.com/rokam/midea-local/commit/84293bfd86b9bb55f59b6897ff5d356df51f7fdb))
90+
91+
92+
### Bug Fixes
93+
94+
* **cloud:** meiju cloud download_lua appliance_type error ([#281](https://github.com/rokam/midea-local/issues/281)) ([54f1bf4](https://github.com/rokam/midea-local/commit/54f1bf4a812c44590d9e01e9cd91c4c0f1768948))
95+
96+
## [2.6.3](https://github.com/rokam/midea-local/compare/v2.6.2...v2.6.3) (2024-08-13)
97+
98+
99+
### Bug Fixes
100+
101+
* body_type default value is zero and not None ([#271](https://github.com/rokam/midea-local/issues/271)) ([bf6b4f0](https://github.com/rokam/midea-local/commit/bf6b4f0d0548bf495339cf793acd30673634f6d1))
102+
* **c3:** silent level as string ([#270](https://github.com/rokam/midea-local/issues/270)) ([c851e33](https://github.com/rokam/midea-local/commit/c851e33dc9e8f7bb5a2f7d49f2e7c557d3a7151f))
103+
104+
## [2.6.2](https://github.com/rokam/midea-local/compare/v2.6.1...v2.6.2) (2024-08-10)
105+
106+
107+
### Bug Fixes
108+
109+
* **cli:** discover must return a list ([#266](https://github.com/rokam/midea-local/issues/266)) ([345794b](https://github.com/rokam/midea-local/commit/345794b1241c149c172c117412ed48707daff6b9))
110+
111+
## [2.6.1](https://github.com/rokam/midea-local/compare/v2.6.0...v2.6.1) (2024-08-09)
112+
113+
114+
### Bug Fixes
115+
116+
* **c3:** silent typo ([#265](https://github.com/rokam/midea-local/issues/265)) ([97defcd](https://github.com/rokam/midea-local/commit/97defcdc100424992c0f2bc7d4797cbbb6825076))
117+
* **cli:** authenticate on discover v3 device ([#263](https://github.com/rokam/midea-local/issues/263)) ([05b0b11](https://github.com/rokam/midea-local/commit/05b0b11d98a3435373742c2cf50142f618700ed1))
118+
119+
## [2.6.0](https://github.com/rokam/midea-local/compare/v2.5.0...v2.6.0) (2024-08-02)
120+
121+
122+
### Features
123+
124+
* parse all the response items from MeijuCloud for get_device_inf ([#231](https://github.com/rokam/midea-local/issues/231)) ([1976eb6](https://github.com/rokam/midea-local/commit/1976eb63578698d2b9a745a92c9c61a887219e0d))
125+
126+
127+
### Bug Fixes
128+
129+
* **cli:** authenticate to get keys ([#256](https://github.com/rokam/midea-local/issues/256)) ([a017e7a](https://github.com/rokam/midea-local/commit/a017e7af46130266226f6c9a100b05703dd6cb5c))
130+
* tank is always seen as full ([#255](https://github.com/rokam/midea-local/issues/255)) ([3524405](https://github.com/rokam/midea-local/commit/3524405fd36131deb83c9ded236eb686860f58c2))
131+
132+
## [2.5.0](https://github.com/rokam/midea-local/compare/v2.4.0...v2.5.0) (2024-07-30)
133+
134+
135+
### Features
136+
137+
* **40:** add `precision_halves` customization ([#248](https://github.com/rokam/midea-local/issues/248)) ([8f5ec79](https://github.com/rokam/midea-local/commit/8f5ec79fe859ad88519360353cd3b6e159200625))
138+
* **b8:** first implementation ([#225](https://github.com/rokam/midea-local/issues/225)) ([259e4f2](https://github.com/rokam/midea-local/commit/259e4f2f715b38a280789530941acc53d98beca4))
139+
140+
141+
### Bug Fixes
142+
143+
* `break` the loop when connected ([#244](https://github.com/rokam/midea-local/issues/244)) ([536f975](https://github.com/rokam/midea-local/commit/536f975b93a3d68466a1bfa5a7c152570121531e))
144+
* **ac:** correct attributes based on msg type ([#251](https://github.com/rokam/midea-local/issues/251)) ([fada9bc](https://github.com/rokam/midea-local/commit/fada9bc5fcc4158a6315566b8e9372c8805e21b4))
145+
* **cloud:** fix email obfuscation ([#245](https://github.com/rokam/midea-local/issues/245)) ([ad9f278](https://github.com/rokam/midea-local/commit/ad9f278c7284e7e80285d66adc8320bb944f1162))
146+
3147
## [2.4.0](https://github.com/rokam/midea-local/compare/v2.3.0...v2.4.0) (2024-07-24)
4148

5149

commitlint.config.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default {
2+
extends: ["@commitlint/config-conventional"],
3+
rules: {
4+
"body-max-line-length": [2, "always", 300],
5+
},
6+
};

library_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ async def main() -> None:
106106
port=first_device["port"],
107107
token=token,
108108
key=key,
109-
protocol=first_device["protocol"],
109+
device_protocol=first_device["protocol"],
110110
model=first_device["model"],
111111
subtype=0,
112112
customize="",

0 commit comments

Comments
 (0)