Skip to content

Commit becf398

Browse files
committed
Add fanSpeeds
1 parent e7bfdbd commit becf398

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

.github/workflows/tests.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: 🏗 Install dependencies
3636
run: poetry install --no-interaction
3737
- name: 🚀 Run pytest
38-
run: poetry run pytest --cov tado tests
38+
run: poetry run pytest --cov tado tests --cov-fail-under=95
3939
- name: ⬆️ Upload coverage artifact
4040
uses: actions/[email protected]
4141
with:
@@ -71,6 +71,8 @@ jobs:
7171
run: |
7272
poetry run coverage combine coverage*/.coverage*
7373
poetry run coverage xml -i
74+
- name: ✅ Enforce minimum coverage (95%)
75+
run: poetry run coverage report -m --fail-under=95
7476
- name: 🚀 Upload coverage report
7577
uses: codecov/[email protected]
7678
with:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ repos:
112112
name: 🧪 Running tests and test coverage with pytest
113113
language: system
114114
types: [python]
115-
entry: poetry run pytest
115+
entry: poetry run pytest --cov=. --cov-report=term-missing --cov-report=xml --cov-fail-under=95
116116
pass_filenames: false
117117
- id: trailing-whitespace
118118
name: ✄ Trim Trailing Whitespace

src/tadoasync/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,9 @@ class AutoAC(DataClassORJSONMixin):
308308
fan_level: list[str] | None = field(
309309
default=None, metadata=field_options(alias="fanLevel")
310310
)
311+
fan_speeds: list[str] | None = field(
312+
default=None, metadata=field_options(alias="fanSpeeds")
313+
)
311314
vertical_swing: list[str] | None = field(
312315
default=None, metadata=field_options(alias="verticalSwing")
313316
)

tests/__snapshots__/test_tado.ambr

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@
3434
dict({
3535
'auto': dict({
3636
'fan_level': None,
37+
'fan_speeds': list([
38+
'AUTO',
39+
'HIGH',
40+
'MIDDLE',
41+
'LOW',
42+
]),
3743
'horizontal_swing': None,
3844
'light': None,
3945
'temperatures': None,
@@ -106,6 +112,7 @@
106112
'LEVEL5',
107113
'SILENT',
108114
]),
115+
'fan_speeds': None,
109116
'horizontal_swing': list([
110117
'OFF',
111118
'ON',

0 commit comments

Comments
 (0)