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
280 changes: 26 additions & 254 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "tadoasync"
version = "0.1.14"
version = "0.1.15"
authors = ["Erwin Douna <e.douna@gmail.com>"]
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand All @@ -26,10 +26,7 @@ mashumaro = ">=3.10"
orjson = ">=3.9.8"
python = "^3.12"
yarl = ">=1.6.0"
oauthlib = "^3.2.2"
requests-oauthlib = "^1.3.1"
aioresponses = "^0.7.6"
sphinx-rtd-theme = "^2.0.0"

[tool.poetry.urls]
"Bug Tracker" = "https://github.com/erwindouna/python-tado/issues"
Expand All @@ -51,6 +48,7 @@ ruff = "0.1.13"
safety = "3.0.1"
yamllint = "1.33.0"
syrupy = "4.6.1"
deptry = "^0.19.1"

[tool.coverage.report]
show_missing = true
Expand Down
11 changes: 11 additions & 0 deletions src/tadoasync/tadoasync.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,17 @@ async def get_device_info(
response = await self._request(f"devices/{serial_no}/{attribute}")
return TemperatureOffset.from_json(response)

async def set_child_lock(self, serial_no: str, child_lock: bool | None) -> None:
"""Set the child lock."""
if not isinstance(child_lock, bool):
raise TadoBadRequestError("child_lock must be a boolean")

await self._request(
f"devices/{serial_no}/childLock",
data={"childLockEnabled": child_lock},
method=HttpMethod.PUT,
)

async def set_meter_readings(
self, date: str | None = None, reading: int = 0
) -> str:
Expand Down
Loading