myPyllant 0.7.0__tar.gz → 0.7.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mypyllant-0.7.0 → mypyllant-0.7.2}/.pre-commit-config.yaml +23 -25
- {mypyllant-0.7.0 → mypyllant-0.7.2}/PKG-INFO +1 -1
- {mypyllant-0.7.0 → mypyllant-0.7.2}/dev-requirements.txt +4 -1
- {mypyllant-0.7.0 → mypyllant-0.7.2}/pyproject.toml +6 -6
- mypyllant-0.7.2/run_venv.sh +9 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/api.py +2 -1
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/models.py +38 -11
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/generate_test_data.py +10 -8
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/run_function_test.py +17 -14
- mypyllant-0.7.0/run_pytest.sh +0 -9
- {mypyllant-0.7.0 → mypyllant-0.7.2}/.devcontainer.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/.dockerignore +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/.github/dependabot.yml +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/.github/workflows/build-test.yaml +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/.github/workflows/docker.yaml +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/.gitignore +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/.vscode/settings.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/.vscode/tasks.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/Dockerfile +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/LICENSE +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/README.md +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/logo.png +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/scripts/precommit +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/scripts/setup +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/__init__.py +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/const.py +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/export.py +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/py.typed +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/report.py +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/sample.py +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/__init__.py +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/conftest.py +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/find_countries.py +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/heatpump_electric_backup/335e4ac949f68855c761a15671e5da393cf96ffe/connection_status.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/heatpump_electric_backup/335e4ac949f68855c761a15671e5da393cf96ffe/control_identifier.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/heatpump_electric_backup/335e4ac949f68855c761a15671e5da393cf96ffe/current_system.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/heatpump_electric_backup/335e4ac949f68855c761a15671e5da393cf96ffe/device_buckets.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/heatpump_electric_backup/335e4ac949f68855c761a15671e5da393cf96ffe/diagnostic_trouble_codes.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/heatpump_electric_backup/335e4ac949f68855c761a15671e5da393cf96ffe/mpc.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/heatpump_electric_backup/335e4ac949f68855c761a15671e5da393cf96ffe/system.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/heatpump_electric_backup/335e4ac949f68855c761a15671e5da393cf96ffe/time_zone.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/heatpump_electric_backup/homes.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/no_system/1835c08766437e41a9c69bdf454e0ec8bfb0e82f/connection_status.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/no_system/1835c08766437e41a9c69bdf454e0ec8bfb0e82f/control_identifier.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/no_system/1835c08766437e41a9c69bdf454e0ec8bfb0e82f/current_system.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/no_system/1835c08766437e41a9c69bdf454e0ec8bfb0e82f/device_buckets.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/no_system/1835c08766437e41a9c69bdf454e0ec8bfb0e82f/firmware_update_required.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/no_system/1835c08766437e41a9c69bdf454e0ec8bfb0e82f/system.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/no_system/1835c08766437e41a9c69bdf454e0ec8bfb0e82f/time_zone.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/no_system/homes.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/one_system_two_heatpumps/7571042b8af21b829bda040425f77a76706b03d7/connection_status.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/one_system_two_heatpumps/7571042b8af21b829bda040425f77a76706b03d7/control_identifier.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/one_system_two_heatpumps/7571042b8af21b829bda040425f77a76706b03d7/current_system.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/one_system_two_heatpumps/7571042b8af21b829bda040425f77a76706b03d7/device_buckets.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/one_system_two_heatpumps/7571042b8af21b829bda040425f77a76706b03d7/diagnostic_trouble_codes.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/one_system_two_heatpumps/7571042b8af21b829bda040425f77a76706b03d7/mpc.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/one_system_two_heatpumps/7571042b8af21b829bda040425f77a76706b03d7/system.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/one_system_two_heatpumps/7571042b8af21b829bda040425f77a76706b03d7/time_zone.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/one_system_two_heatpumps/homes.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/two_systems/e763593de7370e8d6f90fea50daacd9883e2e532/connection_status.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/two_systems/e763593de7370e8d6f90fea50daacd9883e2e532/control_identifier.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/two_systems/e763593de7370e8d6f90fea50daacd9883e2e532/current_system.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/two_systems/e763593de7370e8d6f90fea50daacd9883e2e532/device_buckets.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/two_systems/e763593de7370e8d6f90fea50daacd9883e2e532/diagnostic_trouble_codes.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/two_systems/e763593de7370e8d6f90fea50daacd9883e2e532/mpc.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/two_systems/e763593de7370e8d6f90fea50daacd9883e2e532/system.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/two_systems/e763593de7370e8d6f90fea50daacd9883e2e532/time_zone.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/two_systems/eed6a6500c47dc8f433846e845bb662e13fe469e/connection_status.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/two_systems/eed6a6500c47dc8f433846e845bb662e13fe469e/control_identifier.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/two_systems/eed6a6500c47dc8f433846e845bb662e13fe469e/current_system.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/two_systems/eed6a6500c47dc8f433846e845bb662e13fe469e/device_buckets.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/two_systems/eed6a6500c47dc8f433846e845bb662e13fe469e/diagnostic_trouble_codes.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/two_systems/eed6a6500c47dc8f433846e845bb662e13fe469e/mpc.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/two_systems/eed6a6500c47dc8f433846e845bb662e13fe469e/system.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/two_systems/eed6a6500c47dc8f433846e845bb662e13fe469e/time_zone.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/two_systems/homes.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/ventilation/8fa4fe154d541e83ee01c807c0c85e29fc8c02ae/connection_status.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/ventilation/8fa4fe154d541e83ee01c807c0c85e29fc8c02ae/control_identifier.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/ventilation/8fa4fe154d541e83ee01c807c0c85e29fc8c02ae/current_system.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/ventilation/8fa4fe154d541e83ee01c807c0c85e29fc8c02ae/device_buckets.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/ventilation/8fa4fe154d541e83ee01c807c0c85e29fc8c02ae/diagnostic_trouble_codes.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/ventilation/8fa4fe154d541e83ee01c807c0c85e29fc8c02ae/system.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/ventilation/8fa4fe154d541e83ee01c807c0c85e29fc8c02ae/time_zone.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/ventilation/homes.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/vrc700/214ff1c13404bfd2d9350da3bfe86d45b9a7d670/connection_status.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/vrc700/214ff1c13404bfd2d9350da3bfe86d45b9a7d670/control_identifier.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/vrc700/214ff1c13404bfd2d9350da3bfe86d45b9a7d670/current_system.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/vrc700/214ff1c13404bfd2d9350da3bfe86d45b9a7d670/device_buckets.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/vrc700/214ff1c13404bfd2d9350da3bfe86d45b9a7d670/diagnostic_trouble_codes.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/vrc700/214ff1c13404bfd2d9350da3bfe86d45b9a7d670/mpc.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/vrc700/214ff1c13404bfd2d9350da3bfe86d45b9a7d670/system.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/vrc700/214ff1c13404bfd2d9350da3bfe86d45b9a7d670/time_zone.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/vrc700/homes.json +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/test_api.py +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/test_countries.py +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/test_export.py +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/test_generate_test_data.py +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/test_models.py +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/test_sample.py +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/test_utils.py +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/update_sample.py +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/utils.py +0 -0
- {mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/utils.py +0 -0
|
@@ -13,30 +13,12 @@ repos:
|
|
|
13
13
|
- --ignore-words-list=hass,alot,datas,dof,dur,farenheit,hist,iff,ines,ist,lightsensor,mut,nd,pres,referer,ser,serie,te,technik,ue,uint,visability,wan,wanna,withing
|
|
14
14
|
- --skip="./.*,*.csv,*.json"
|
|
15
15
|
- --quiet-level=2
|
|
16
|
-
exclude_types: [csv, json]
|
|
16
|
+
exclude_types: [ csv, json ]
|
|
17
17
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
18
18
|
rev: v4.4.0
|
|
19
19
|
hooks:
|
|
20
20
|
- id: check-executables-have-shebangs
|
|
21
21
|
- id: check-json
|
|
22
|
-
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
23
|
-
rev: v1.0.1
|
|
24
|
-
hooks:
|
|
25
|
-
- id: mypy
|
|
26
|
-
args:
|
|
27
|
-
- --pretty
|
|
28
|
-
- --show-error-codes
|
|
29
|
-
- --show-error-context
|
|
30
|
-
additional_dependencies:
|
|
31
|
-
- aiohttp
|
|
32
|
-
- aioresponses
|
|
33
|
-
- dacite
|
|
34
|
-
- exceptiongroup
|
|
35
|
-
- freezegun
|
|
36
|
-
- pytest
|
|
37
|
-
- tomli
|
|
38
|
-
- types-requests
|
|
39
|
-
- types-python-dateutil
|
|
40
22
|
- repo: local
|
|
41
23
|
hooks:
|
|
42
24
|
- id: update-sample
|
|
@@ -46,9 +28,25 @@ repos:
|
|
|
46
28
|
pass_filenames: false
|
|
47
29
|
- repo: local
|
|
48
30
|
hooks:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
31
|
+
- id: mypy
|
|
32
|
+
name: mypy
|
|
33
|
+
entry: run_venv.sh
|
|
34
|
+
args:
|
|
35
|
+
- mypy
|
|
36
|
+
- --pretty
|
|
37
|
+
- --show-error-codes
|
|
38
|
+
- --show-error-context
|
|
39
|
+
- --check-untyped-defs
|
|
40
|
+
language: script
|
|
41
|
+
pass_filenames: true
|
|
42
|
+
files: ^src/.+\.py$
|
|
43
|
+
- id: pytest
|
|
44
|
+
name: pytest
|
|
45
|
+
entry: run_venv.sh
|
|
46
|
+
args:
|
|
47
|
+
- pytest
|
|
48
|
+
- --no-cov
|
|
49
|
+
- -n4
|
|
50
|
+
language: script
|
|
51
|
+
pass_filenames: false
|
|
52
|
+
files: ^src/.+\.(py|json|yaml)$
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: myPyllant
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.2
|
|
4
4
|
Summary: A Python library to interact with the API behind the myVAILLANT app
|
|
5
5
|
Project-URL: Homepage, https://github.com/signalkraft/myPyllant
|
|
6
6
|
Project-URL: Bug Tracker, https://github.com/signalkraft/myPyllant/issues
|
|
@@ -4,6 +4,7 @@ aiohttp>=3.8.0
|
|
|
4
4
|
pytest-aiohttp~=1.0.5
|
|
5
5
|
pytest-cov~=4.1.0
|
|
6
6
|
pytest-mock~=3.12.0
|
|
7
|
+
pytest-xdist>=3.3.0
|
|
7
8
|
pre-commit~=3.6.0
|
|
8
9
|
build~=1.0.3
|
|
9
10
|
freezegun~=1.4.0
|
|
@@ -11,4 +12,6 @@ country_list~=1.1.0
|
|
|
11
12
|
requests~=2.31.0
|
|
12
13
|
dacite>=1.7.0
|
|
13
14
|
python-dateutil>=2.8.0
|
|
14
|
-
|
|
15
|
+
mypy~=1.8.0
|
|
16
|
+
types-python-dateutil~=2.8.19.14
|
|
17
|
+
types-requests~=2.31.0.20231231
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "myPyllant"
|
|
3
3
|
authors = [
|
|
4
|
-
|
|
4
|
+
{ name = "Philipp", email = "pd@signalkraft.com" },
|
|
5
5
|
]
|
|
6
6
|
description = "A Python library to interact with the API behind the myVAILLANT app"
|
|
7
7
|
readme = "README.md"
|
|
@@ -12,9 +12,9 @@ classifiers = [
|
|
|
12
12
|
"Operating System :: OS Independent",
|
|
13
13
|
]
|
|
14
14
|
dependencies = [
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
"aiohttp>=3.8.0",
|
|
16
|
+
"dacite>=1.7.0",
|
|
17
|
+
"python-dateutil>=2.8.0",
|
|
18
18
|
]
|
|
19
19
|
dynamic = ["version"]
|
|
20
20
|
|
|
@@ -31,9 +31,9 @@ source = "vcs"
|
|
|
31
31
|
|
|
32
32
|
[tool.pytest.ini_options]
|
|
33
33
|
pythonpath = [
|
|
34
|
-
|
|
34
|
+
"src"
|
|
35
35
|
]
|
|
36
|
-
addopts = "--cov=src"
|
|
36
|
+
addopts = "-n4 --cov=src"
|
|
37
37
|
asyncio_mode = "auto"
|
|
38
38
|
testpaths = [
|
|
39
39
|
"src/myPyllant/tests",
|
|
@@ -210,7 +210,7 @@ class MyPyllantAPI:
|
|
|
210
210
|
+ r"\?([^\"]*)",
|
|
211
211
|
login_html,
|
|
212
212
|
)
|
|
213
|
-
login_url = unescape(result.group())
|
|
213
|
+
login_url = unescape(result.group()) if result else None
|
|
214
214
|
if not login_url:
|
|
215
215
|
raise AuthenticationFailed("Could not get login URL")
|
|
216
216
|
|
|
@@ -370,6 +370,7 @@ class MyPyllantAPI:
|
|
|
370
370
|
brand=self.brand,
|
|
371
371
|
home=home,
|
|
372
372
|
timezone=home.timezone,
|
|
373
|
+
control_identifier=await self.get_control_identifier(home.system_id),
|
|
373
374
|
connected=await self.get_connection_status(home.system_id)
|
|
374
375
|
if include_connection_status
|
|
375
376
|
else None,
|
|
@@ -6,7 +6,7 @@ import logging
|
|
|
6
6
|
from collections.abc import Iterator
|
|
7
7
|
from dataclasses import dataclass, field, asdict
|
|
8
8
|
from enum import Enum, EnumMeta
|
|
9
|
-
from typing import TypeVar
|
|
9
|
+
from typing import TypeVar, Any
|
|
10
10
|
|
|
11
11
|
from dacite import Config, from_dict
|
|
12
12
|
from dacite.dataclasses import get_fields
|
|
@@ -108,7 +108,7 @@ class MyPyllantDataClass:
|
|
|
108
108
|
Base class that runs type validation in __init__ and can create an instance from API values
|
|
109
109
|
"""
|
|
110
110
|
|
|
111
|
-
extra_fields: dict = field(default_factory=dict)
|
|
111
|
+
extra_fields: dict[str, Any] = field(default_factory=dict)
|
|
112
112
|
|
|
113
113
|
@classmethod
|
|
114
114
|
def type_hooks(cls: type[T], timezone: datetime.tzinfo | None) -> dict:
|
|
@@ -210,13 +210,13 @@ class BaseTimeProgramDay(MyPyllantDataClass):
|
|
|
210
210
|
|
|
211
211
|
@dataclass
|
|
212
212
|
class BaseTimeProgram(MyPyllantDataClass):
|
|
213
|
-
monday: list
|
|
214
|
-
tuesday: list
|
|
215
|
-
wednesday: list
|
|
216
|
-
thursday: list
|
|
217
|
-
friday: list
|
|
218
|
-
saturday: list
|
|
219
|
-
sunday: list
|
|
213
|
+
monday: list
|
|
214
|
+
tuesday: list
|
|
215
|
+
wednesday: list
|
|
216
|
+
thursday: list
|
|
217
|
+
friday: list
|
|
218
|
+
saturday: list
|
|
219
|
+
sunday: list
|
|
220
220
|
meta_info: dict | None = None
|
|
221
221
|
|
|
222
222
|
@property
|
|
@@ -308,6 +308,14 @@ class ZoneTimeProgramDay(BaseTimeProgramDay):
|
|
|
308
308
|
|
|
309
309
|
@dataclass
|
|
310
310
|
class ZoneTimeProgram(BaseTimeProgram):
|
|
311
|
+
monday: list[ZoneTimeProgramDay]
|
|
312
|
+
tuesday: list[ZoneTimeProgramDay]
|
|
313
|
+
wednesday: list[ZoneTimeProgramDay]
|
|
314
|
+
thursday: list[ZoneTimeProgramDay]
|
|
315
|
+
friday: list[ZoneTimeProgramDay]
|
|
316
|
+
saturday: list[ZoneTimeProgramDay]
|
|
317
|
+
sunday: list[ZoneTimeProgramDay]
|
|
318
|
+
|
|
311
319
|
@classmethod
|
|
312
320
|
def create_day_from_api(cls, **kwargs):
|
|
313
321
|
return ZoneTimeProgramDay(**kwargs)
|
|
@@ -321,7 +329,7 @@ class ZoneTimeProgram(BaseTimeProgram):
|
|
|
321
329
|
weekday_names = [w.lower() for w in calendar.day_name]
|
|
322
330
|
if update_similar_to_dow and update_similar_to_dow not in weekday_names:
|
|
323
331
|
raise ValueError(
|
|
324
|
-
"%s is not a valid weekday,
|
|
332
|
+
"%s is not a valid weekday, use one of %s or None",
|
|
325
333
|
update_similar_to_dow,
|
|
326
334
|
", ".join(weekday_names),
|
|
327
335
|
)
|
|
@@ -409,6 +417,7 @@ class Zone(MyPyllantDataClass):
|
|
|
409
417
|
system_id: str
|
|
410
418
|
general: ZoneGeneral
|
|
411
419
|
timezone: datetime.tzinfo
|
|
420
|
+
control_identifier: str
|
|
412
421
|
index: int
|
|
413
422
|
zone_binding: str
|
|
414
423
|
heating: ZoneHeating
|
|
@@ -459,6 +468,10 @@ class Zone(MyPyllantDataClass):
|
|
|
459
468
|
else None
|
|
460
469
|
)
|
|
461
470
|
|
|
471
|
+
@property
|
|
472
|
+
def is_eco_mode(self) -> bool:
|
|
473
|
+
return self.desired_room_temperature_setpoint == 0.0
|
|
474
|
+
|
|
462
475
|
|
|
463
476
|
@dataclass
|
|
464
477
|
class Circuit(MyPyllantDataClass):
|
|
@@ -490,6 +503,14 @@ class DHWTimeProgramDay(BaseTimeProgramDay):
|
|
|
490
503
|
|
|
491
504
|
@dataclass
|
|
492
505
|
class DHWTimeProgram(BaseTimeProgram):
|
|
506
|
+
monday: list[DHWTimeProgramDay]
|
|
507
|
+
tuesday: list[DHWTimeProgramDay]
|
|
508
|
+
wednesday: list[DHWTimeProgramDay]
|
|
509
|
+
thursday: list[DHWTimeProgramDay]
|
|
510
|
+
friday: list[DHWTimeProgramDay]
|
|
511
|
+
saturday: list[DHWTimeProgramDay]
|
|
512
|
+
sunday: list[DHWTimeProgramDay]
|
|
513
|
+
|
|
493
514
|
@classmethod
|
|
494
515
|
def create_day_from_api(cls, **kwargs):
|
|
495
516
|
return DHWTimeProgramDay(**kwargs)
|
|
@@ -538,6 +559,7 @@ class System(MyPyllantDataClass):
|
|
|
538
559
|
home: Home
|
|
539
560
|
brand: str
|
|
540
561
|
timezone: datetime.tzinfo
|
|
562
|
+
control_identifier: str
|
|
541
563
|
connected: bool | None = None
|
|
542
564
|
diagnostic_trouble_codes: list | None = None
|
|
543
565
|
current_system: dict = field(default_factory=dict)
|
|
@@ -556,7 +578,12 @@ class System(MyPyllantDataClass):
|
|
|
556
578
|
logger.debug(f"Creating related models from state: {kwargs}")
|
|
557
579
|
system.extra_fields = system.merge_extra_fields()
|
|
558
580
|
system.zones = [
|
|
559
|
-
Zone.from_api(
|
|
581
|
+
Zone.from_api(
|
|
582
|
+
system_id=system.id,
|
|
583
|
+
timezone=system.timezone,
|
|
584
|
+
control_identifier=system.control_identifier,
|
|
585
|
+
**z,
|
|
586
|
+
)
|
|
560
587
|
for z in system.merge_object("zones")
|
|
561
588
|
]
|
|
562
589
|
system.circuits = [
|
|
@@ -8,6 +8,8 @@ import json
|
|
|
8
8
|
import logging
|
|
9
9
|
import secrets
|
|
10
10
|
import signal
|
|
11
|
+
from typing import Any, TypeVar
|
|
12
|
+
|
|
11
13
|
import sys
|
|
12
14
|
from datetime import datetime, timedelta
|
|
13
15
|
from pathlib import Path
|
|
@@ -61,7 +63,7 @@ async def main(user, password, brand, country=None, write_results=True):
|
|
|
61
63
|
from myPyllant.models import DeviceDataBucketResolution
|
|
62
64
|
from myPyllant.utils import datetime_format
|
|
63
65
|
|
|
64
|
-
results = {}
|
|
66
|
+
results: dict[str, Any] = {}
|
|
65
67
|
json_dir = user_json_dir(user)
|
|
66
68
|
if write_results:
|
|
67
69
|
json_dir.mkdir(parents=True, exist_ok=True)
|
|
@@ -88,10 +90,9 @@ async def main(user, password, brand, country=None, write_results=True):
|
|
|
88
90
|
) as homes_resp:
|
|
89
91
|
homes = await homes_resp.json()
|
|
90
92
|
anonymized_homes = _recursive_data_anonymize(copy.deepcopy(homes), SALT)
|
|
91
|
-
for
|
|
92
|
-
if "address" in
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
for home in anonymized_homes:
|
|
94
|
+
if "address" in home:
|
|
95
|
+
home.pop("address")
|
|
95
96
|
create_result(
|
|
96
97
|
anonymized_homes,
|
|
97
98
|
name="homes",
|
|
@@ -270,9 +271,10 @@ async def main(user, password, brand, country=None, write_results=True):
|
|
|
270
271
|
return results
|
|
271
272
|
|
|
272
273
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
274
|
+
T = TypeVar("T")
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
def _recursive_data_anonymize(data: T, salt: bytes = b"") -> T:
|
|
276
278
|
if isinstance(data, list):
|
|
277
279
|
for elem in data:
|
|
278
280
|
_recursive_data_anonymize(elem, salt)
|
|
@@ -38,11 +38,12 @@ async def main(user, password, brand, country):
|
|
|
38
38
|
zone, zone.heating.set_back_temperature
|
|
39
39
|
)
|
|
40
40
|
)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
if zone.heating.manual_mode_setpoint_heating:
|
|
42
|
+
print(
|
|
43
|
+
await api.set_manual_mode_setpoint(
|
|
44
|
+
zone, zone.heating.manual_mode_setpoint_heating
|
|
45
|
+
)
|
|
44
46
|
)
|
|
45
|
-
)
|
|
46
47
|
print(
|
|
47
48
|
await api.set_zone_heating_operating_mode(
|
|
48
49
|
zone, zone.heating.operation_mode_heating
|
|
@@ -55,13 +56,14 @@ async def main(user, password, brand, country):
|
|
|
55
56
|
zone, "heating", zone.heating.time_program_heating
|
|
56
57
|
)
|
|
57
58
|
)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
if zone.heating.time_program_heating.monday[0].setpoint:
|
|
60
|
+
print(
|
|
61
|
+
await api.set_time_program_temperature(
|
|
62
|
+
zone,
|
|
63
|
+
"heating",
|
|
64
|
+
zone.heating.time_program_heating.monday[0].setpoint,
|
|
65
|
+
)
|
|
63
66
|
)
|
|
64
|
-
)
|
|
65
67
|
|
|
66
68
|
if system.domestic_hot_water:
|
|
67
69
|
dhw = system.domestic_hot_water[0]
|
|
@@ -72,11 +74,12 @@ async def main(user, password, brand, country):
|
|
|
72
74
|
)
|
|
73
75
|
print(await api.boost_domestic_hot_water(dhw))
|
|
74
76
|
print(await api.cancel_hot_water_boost(dhw))
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
if dhw.tapping_setpoint:
|
|
78
|
+
print(
|
|
79
|
+
await api.set_domestic_hot_water_temperature(
|
|
80
|
+
dhw, int(dhw.tapping_setpoint)
|
|
81
|
+
)
|
|
78
82
|
)
|
|
79
|
-
)
|
|
80
83
|
print(
|
|
81
84
|
await api.set_domestic_hot_water_time_program(
|
|
82
85
|
dhw, dhw.time_program_dhw
|
mypyllant-0.7.0/run_pytest.sh
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/heatpump_electric_backup/homes.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mypyllant-0.7.0 → mypyllant-0.7.2}/src/myPyllant/tests/json/one_system_two_heatpumps/homes.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|