pytouchlinesl 0.1.2__tar.gz → 0.1.3__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.
- {pytouchlinesl-0.1.2/pytouchlinesl.egg-info → pytouchlinesl-0.1.3}/PKG-INFO +2 -2
- {pytouchlinesl-0.1.2 → pytouchlinesl-0.1.3}/pyproject.toml +2 -2
- {pytouchlinesl-0.1.2 → pytouchlinesl-0.1.3}/pytouchlinesl/client/client.py +18 -6
- {pytouchlinesl-0.1.2 → pytouchlinesl-0.1.3}/pytouchlinesl/client/models/models.py +4 -1
- {pytouchlinesl-0.1.2 → pytouchlinesl-0.1.3/pytouchlinesl.egg-info}/PKG-INFO +2 -2
- {pytouchlinesl-0.1.2 → pytouchlinesl-0.1.3}/pytouchlinesl.egg-info/requires.txt +1 -1
- {pytouchlinesl-0.1.2 → pytouchlinesl-0.1.3}/LICENSE +0 -0
- {pytouchlinesl-0.1.2 → pytouchlinesl-0.1.3}/README.md +0 -0
- {pytouchlinesl-0.1.2 → pytouchlinesl-0.1.3}/pytouchlinesl/__init__.py +0 -0
- {pytouchlinesl-0.1.2 → pytouchlinesl-0.1.3}/pytouchlinesl/client/__init__.py +0 -0
- {pytouchlinesl-0.1.2 → pytouchlinesl-0.1.3}/pytouchlinesl/client/base.py +0 -0
- {pytouchlinesl-0.1.2 → pytouchlinesl-0.1.3}/pytouchlinesl/client/models/__init__.py +0 -0
- {pytouchlinesl-0.1.2 → pytouchlinesl-0.1.3}/pytouchlinesl/module.py +0 -0
- {pytouchlinesl-0.1.2 → pytouchlinesl-0.1.3}/pytouchlinesl/touchlinesl.py +0 -0
- {pytouchlinesl-0.1.2 → pytouchlinesl-0.1.3}/pytouchlinesl/zone.py +0 -0
- {pytouchlinesl-0.1.2 → pytouchlinesl-0.1.3}/pytouchlinesl.egg-info/SOURCES.txt +0 -0
- {pytouchlinesl-0.1.2 → pytouchlinesl-0.1.3}/pytouchlinesl.egg-info/dependency_links.txt +0 -0
- {pytouchlinesl-0.1.2 → pytouchlinesl-0.1.3}/pytouchlinesl.egg-info/top_level.txt +0 -0
- {pytouchlinesl-0.1.2 → pytouchlinesl-0.1.3}/setup.cfg +0 -0
- {pytouchlinesl-0.1.2 → pytouchlinesl-0.1.3}/tests/test_module.py +0 -0
- {pytouchlinesl-0.1.2 → pytouchlinesl-0.1.3}/tests/test_touchlinesl.py +0 -0
- {pytouchlinesl-0.1.2 → pytouchlinesl-0.1.3}/tests/test_zone.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pytouchlinesl
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: An API client for Roth's TouchlineSL control system.
|
|
5
5
|
Author-email: Jon Seager <jon@sgrs.uk>
|
|
6
6
|
Project-URL: Homepage, https://github.com/jnsgruk/pytouchlinesl
|
|
@@ -12,7 +12,7 @@ Requires-Python: >=3.10
|
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
|
14
14
|
Requires-Dist: aiohttp
|
|
15
|
-
Requires-Dist: pydantic
|
|
15
|
+
Requires-Dist: pydantic
|
|
16
16
|
Provides-Extra: dev
|
|
17
17
|
Requires-Dist: pytest; extra == "dev"
|
|
18
18
|
Requires-Dist: pytest-asyncio; extra == "dev"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "pytouchlinesl"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.3"
|
|
4
4
|
authors = [{ name = "Jon Seager", email = "jon@sgrs.uk" }]
|
|
5
5
|
description = "An API client for Roth's TouchlineSL control system."
|
|
6
6
|
readme = "README.md"
|
|
@@ -10,7 +10,7 @@ classifiers = [
|
|
|
10
10
|
"License :: OSI Approved :: Apache Software License",
|
|
11
11
|
"Operating System :: OS Independent",
|
|
12
12
|
]
|
|
13
|
-
dependencies = ["aiohttp", "pydantic
|
|
13
|
+
dependencies = ["aiohttp", "pydantic"]
|
|
14
14
|
|
|
15
15
|
[project.optional-dependencies]
|
|
16
16
|
dev = ["pytest", "pytest-asyncio", "ruff"]
|
|
@@ -131,6 +131,22 @@ class RothAPI(BaseClient):
|
|
|
131
131
|
or z.zone.id == zone_id
|
|
132
132
|
]
|
|
133
133
|
|
|
134
|
+
# pydantic v1 compatibility
|
|
135
|
+
try:
|
|
136
|
+
p0_intervals = [
|
|
137
|
+
i.dict(by_alias=True) for i in schedule.p0_intervals if i.start != 6100
|
|
138
|
+
]
|
|
139
|
+
p1_intervals = [
|
|
140
|
+
i.dict(by_alias=True) for i in schedule.p1_intervals if i.start != 6100
|
|
141
|
+
]
|
|
142
|
+
except AttributeError:
|
|
143
|
+
p0_intervals = [
|
|
144
|
+
i.model_dump(by_alias=True) for i in schedule.p0_intervals if i.start != 6100
|
|
145
|
+
]
|
|
146
|
+
p1_intervals = [
|
|
147
|
+
i.model_dump(by_alias=True) for i in schedule.p1_intervals if i.start != 6100
|
|
148
|
+
]
|
|
149
|
+
|
|
134
150
|
# TODO: This be simplified with Pydantic models
|
|
135
151
|
data = {
|
|
136
152
|
"scheduleName": schedule.name,
|
|
@@ -142,14 +158,10 @@ class RothAPI(BaseClient):
|
|
|
142
158
|
"p0SetbackTemp": schedule.p0_setback_temp,
|
|
143
159
|
# Empty intervals start/end with a value of 6100, which is invalid
|
|
144
160
|
# if sent in this request.
|
|
145
|
-
"p0Intervals":
|
|
146
|
-
i.dict(by_alias=True) for i in schedule.p0_intervals if i.start != 6100
|
|
147
|
-
],
|
|
161
|
+
"p0Intervals": p0_intervals,
|
|
148
162
|
"p1Days": schedule.p1_days,
|
|
149
163
|
"p1SetbackTemp": schedule.p1_setback_temp,
|
|
150
|
-
"p1Intervals":
|
|
151
|
-
i.dict(by_alias=True) for i in schedule.p1_intervals if i.start != 6100
|
|
152
|
-
],
|
|
164
|
+
"p1Intervals": p1_intervals,
|
|
153
165
|
},
|
|
154
166
|
}
|
|
155
167
|
|
|
@@ -6,7 +6,10 @@ tweaks to types and names.
|
|
|
6
6
|
|
|
7
7
|
from typing import Any, Dict, List, Literal, Optional
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
try:
|
|
10
|
+
from pydantic.v1 import BaseModel, Field
|
|
11
|
+
except ImportError:
|
|
12
|
+
from pydantic import BaseModel, Field
|
|
10
13
|
|
|
11
14
|
|
|
12
15
|
class ZoneFlagsModel(BaseModel):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pytouchlinesl
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: An API client for Roth's TouchlineSL control system.
|
|
5
5
|
Author-email: Jon Seager <jon@sgrs.uk>
|
|
6
6
|
Project-URL: Homepage, https://github.com/jnsgruk/pytouchlinesl
|
|
@@ -12,7 +12,7 @@ Requires-Python: >=3.10
|
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
|
14
14
|
Requires-Dist: aiohttp
|
|
15
|
-
Requires-Dist: pydantic
|
|
15
|
+
Requires-Dist: pydantic
|
|
16
16
|
Provides-Extra: dev
|
|
17
17
|
Requires-Dist: pytest; extra == "dev"
|
|
18
18
|
Requires-Dist: pytest-asyncio; extra == "dev"
|
|
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
|