pyworxcloud 6.3.2__tar.gz → 6.3.4__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.
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/PKG-INFO +1 -1
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyproject.toml +1 -1
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/__init__.py +8 -4
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/utils/devices.py +11 -1
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/utils/requests.py +2 -2
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/LICENSE +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/README.md +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/api.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/clouds.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/const.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/day_map.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/deprecations.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/events.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/exceptions.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/helpers/__init__.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/helpers/logger.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/helpers/time_format.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/utils/__init__.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/utils/battery.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/utils/blades.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/utils/capability.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/utils/firmware.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/utils/landroid_class.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/utils/lawn.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/utils/location.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/utils/mqtt.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/utils/orientation.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/utils/product.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/utils/rainsensor.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/utils/schedule_codec.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/utils/schedule_mapper.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/utils/schedules.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/utils/state.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/utils/statistics.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/utils/warranty.py +0 -0
- {pyworxcloud-6.3.2 → pyworxcloud-6.3.4}/pyworxcloud/utils/zone.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
4
4
|
|
|
5
5
|
[tool.poetry]
|
|
6
6
|
name = "pyworxcloud"
|
|
7
|
-
version = "6.3.
|
|
7
|
+
version = "6.3.4"
|
|
8
8
|
description = "Landroid cloud (Positec) API library"
|
|
9
9
|
authors = ["Malene Trab <malene@trab.dk>"]
|
|
10
10
|
documentation = "https://github.com/mtrab/pyworxcloud"
|
|
@@ -1124,7 +1124,9 @@ class WorxCloud(dict):
|
|
|
1124
1124
|
"""
|
|
1125
1125
|
mower = self.get_mower(serial_number)
|
|
1126
1126
|
if mower["online"]:
|
|
1127
|
-
rain_delay = self._coerce_int(
|
|
1127
|
+
rain_delay = self._coerce_int(
|
|
1128
|
+
rain_delay, "rain_delay", minimum=0, maximum=1440
|
|
1129
|
+
)
|
|
1128
1130
|
if mower["protocol"] == 0:
|
|
1129
1131
|
await self.mqtt.apublish(
|
|
1130
1132
|
serial_number,
|
|
@@ -1197,9 +1199,11 @@ class WorxCloud(dict):
|
|
|
1197
1199
|
await self.mqtt.apublish(
|
|
1198
1200
|
serial_number if mower["protocol"] == 0 else mower["uuid"],
|
|
1199
1201
|
mower["mqtt_topics"]["command_in"],
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1202
|
+
(
|
|
1203
|
+
{"cmd": 0, "sc": {"enabled": 0}}
|
|
1204
|
+
if state
|
|
1205
|
+
else {"cmd": 0, "sc": {"enabled": 1}}
|
|
1206
|
+
),
|
|
1203
1207
|
mower["protocol"],
|
|
1204
1208
|
)
|
|
1205
1209
|
elif not device.capabilities.check(DeviceCapability.PARTY_MODE):
|
|
@@ -8,6 +8,7 @@ from datetime import datetime, timedelta, timezone
|
|
|
8
8
|
from typing import Any
|
|
9
9
|
from zoneinfo import ZoneInfo, ZoneInfoNotFoundError
|
|
10
10
|
|
|
11
|
+
from ..clouds import CloudType
|
|
11
12
|
from ..const import UNWANTED_ATTRIBS
|
|
12
13
|
from ..exceptions import APIException, InvalidDataDecodeException
|
|
13
14
|
from ..helpers import convert_to_time
|
|
@@ -319,7 +320,16 @@ class DeviceHandler(LDict):
|
|
|
319
320
|
if isinstance(rain, dict):
|
|
320
321
|
triggered = str(rain.get("s")) == "1"
|
|
321
322
|
self.rainsensor.triggered = triggered
|
|
322
|
-
|
|
323
|
+
# Kress returns rain delay in seconds, others in minutes
|
|
324
|
+
raw_remaining = int(rain.get("cnt", 0))
|
|
325
|
+
if (
|
|
326
|
+
not isinstance(self._api, type(None))
|
|
327
|
+
and hasattr(self._api, "cloud")
|
|
328
|
+
and self._api.cloud == CloudType.KRESS
|
|
329
|
+
):
|
|
330
|
+
self.rainsensor.remaining = raw_remaining // 60
|
|
331
|
+
else:
|
|
332
|
+
self.rainsensor.remaining = raw_remaining
|
|
323
333
|
self.raindelay_active = triggered
|
|
324
334
|
|
|
325
335
|
def _map_cfg(self, cfg_payload: dict[str, Any]) -> None:
|
|
@@ -37,7 +37,7 @@ def HEADERS(access_token: str | None = None) -> dict:
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
if isinstance(access_token, type(None)):
|
|
40
|
-
head.update({"Content-Type": "application/
|
|
40
|
+
head.update({"Content-Type": "application/json"})
|
|
41
41
|
else:
|
|
42
42
|
head.update({"Authorization": f"Bearer {access_token}"})
|
|
43
43
|
|
|
@@ -104,7 +104,7 @@ async def APOST(
|
|
|
104
104
|
owns_session = session is None
|
|
105
105
|
client = session or await create_async_session()
|
|
106
106
|
try:
|
|
107
|
-
async with client.post(URL,
|
|
107
|
+
async with client.post(URL, json=REQUEST_BODY, headers=HEADER) as resp:
|
|
108
108
|
if resp.status >= 400:
|
|
109
109
|
_raise_http_status(resp.status, Exception(f"HTTP {resp.status}"))
|
|
110
110
|
return await resp.json()
|
|
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
|