Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: 🏗 Install dependencies
run: poetry install --no-interaction
- name: 🚀 Run pytest
run: poetry run pytest --cov tado tests
run: poetry run pytest --cov=tadoasync tests --cov-fail-under=95
- name: ⬆️ Upload coverage artifact
uses: actions/upload-artifact@v4.3.1
with:
Expand Down Expand Up @@ -71,6 +71,8 @@ jobs:
run: |
poetry run coverage combine coverage*/.coverage*
poetry run coverage xml -i
- name: ✅ Enforce minimum coverage (95%)
run: poetry run coverage report -m --fail-under=95
- name: 🚀 Upload coverage report
uses: codecov/codecov-action@v4.1.0
with:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ repos:
name: 🧪 Running tests and test coverage with pytest
language: system
types: [python]
entry: poetry run pytest
entry: poetry run pytest --cov=tadoasync --cov-report=term-missing --cov-report=xml --cov-fail-under=95
pass_filenames: false
- id: trailing-whitespace
name: ✄ Trim Trailing Whitespace
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "tadoasync"
version = "0.1.21"
version = "0.2.1"
authors = ["Erwin Douna <e.douna@gmail.com>"]
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand Down Expand Up @@ -52,6 +52,7 @@ deptry = "^0.19.1"

[tool.coverage.report]
show_missing = true
fail_under = 95

[tool.coverage.run]
plugins = ["covdefaults"]
Expand Down
3 changes: 3 additions & 0 deletions src/tadoasync/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@ class AutoAC(DataClassORJSONMixin):
fan_level: list[str] | None = field(
default=None, metadata=field_options(alias="fanLevel")
)
fan_speeds: list[str] | None = field(
default=None, metadata=field_options(alias="fanSpeeds")
)
vertical_swing: list[str] | None = field(
default=None, metadata=field_options(alias="verticalSwing")
)
Expand Down
7 changes: 7 additions & 0 deletions tests/__snapshots__/test_tado.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
dict({
'auto': dict({
'fan_level': None,
'fan_speeds': list([
'AUTO',
'HIGH',
'MIDDLE',
'LOW',
]),
'horizontal_swing': None,
'light': None,
'temperatures': None,
Expand Down Expand Up @@ -106,6 +112,7 @@
'LEVEL5',
'SILENT',
]),
'fan_speeds': None,
'horizontal_swing': list([
'OFF',
'ON',
Expand Down
Loading