python-roborock 4.0.2__tar.gz → 4.1.0__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.
- {python_roborock-4.0.2 → python_roborock-4.1.0}/PKG-INFO +1 -1
- {python_roborock-4.0.2 → python_roborock-4.1.0}/pyproject.toml +1 -1
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/data/code_mappings.py +5 -4
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/device_manager.py +3 -1
- {python_roborock-4.0.2 → python_roborock-4.1.0}/.gitignore +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/LICENSE +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/README.md +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/__init__.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/broadcast_protocol.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/callbacks.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/cli.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/const.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/data/__init__.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/data/b01_q10/__init__.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/data/b01_q10/b01_q10_code_mappings.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/data/b01_q10/b01_q10_containers.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/data/b01_q7/__init__.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/data/b01_q7/b01_q7_code_mappings.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/data/b01_q7/b01_q7_containers.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/data/containers.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/data/dyad/__init__.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/data/dyad/dyad_code_mappings.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/data/dyad/dyad_containers.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/data/v1/__init__.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/data/v1/v1_clean_modes.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/data/v1/v1_code_mappings.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/data/v1/v1_containers.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/data/zeo/__init__.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/data/zeo/zeo_code_mappings.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/data/zeo/zeo_containers.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/device_features.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/README.md +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/__init__.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/a01_channel.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/b01_q7_channel.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/cache.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/channel.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/device.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/file_cache.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/local_channel.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/mqtt_channel.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/__init__.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/a01/__init__.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/b01/__init__.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/b01/q10/__init__.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/b01/q7/__init__.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/traits_mixin.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/__init__.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/child_lock.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/clean_summary.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/command.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/common.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/consumeable.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/device_features.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/do_not_disturb.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/dust_collection_mode.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/flow_led_status.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/home.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/led_status.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/map_content.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/maps.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/network_info.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/rooms.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/routines.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/smart_wash_params.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/status.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/valley_electricity_timer.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/volume.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/wash_towel_mode.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/v1_channel.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/diagnostics.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/exceptions.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/map/__init__.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/map/map_parser.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/mqtt/__init__.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/mqtt/health_manager.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/mqtt/roborock_session.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/mqtt/session.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/protocol.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/protocols/__init__.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/protocols/a01_protocol.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/protocols/b01_q10_protocol.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/protocols/b01_q7_protocol.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/protocols/v1_protocol.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/py.typed +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/roborock_message.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/roborock_typing.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/util.py +0 -0
- {python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/web_api.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-roborock
|
|
3
|
-
Version: 4.0
|
|
3
|
+
Version: 4.1.0
|
|
4
4
|
Summary: A package to control Roborock vacuums.
|
|
5
5
|
Project-URL: Repository, https://github.com/humbertogontijo/python-roborock
|
|
6
6
|
Project-URL: Documentation, https://python-roborock.readthedocs.io/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "python-roborock"
|
|
3
|
-
version = "4.0
|
|
3
|
+
version = "4.1.0"
|
|
4
4
|
description = "A package to control Roborock vacuums."
|
|
5
5
|
authors = [{ name = "humbertogontijo", email = "humbertogontijo@users.noreply.github.com" }, {name="Lash-L"}, {name="allenporter"}]
|
|
6
6
|
requires-python = ">=3.11, <4"
|
|
@@ -3,6 +3,7 @@ from __future__ import annotations
|
|
|
3
3
|
import logging
|
|
4
4
|
from collections import namedtuple
|
|
5
5
|
from enum import Enum, IntEnum, StrEnum
|
|
6
|
+
from typing import Self
|
|
6
7
|
|
|
7
8
|
_LOGGER = logging.getLogger(__name__)
|
|
8
9
|
completed_warnings = set()
|
|
@@ -57,7 +58,7 @@ class RoborockModeEnum(StrEnum):
|
|
|
57
58
|
code: int
|
|
58
59
|
"""The integer code associated with the enum member."""
|
|
59
60
|
|
|
60
|
-
def __new__(cls, value: str, code: int) ->
|
|
61
|
+
def __new__(cls, value: str, code: int) -> Self:
|
|
61
62
|
"""Creates a new enum member."""
|
|
62
63
|
member = str.__new__(cls, value)
|
|
63
64
|
member._value_ = value
|
|
@@ -65,7 +66,7 @@ class RoborockModeEnum(StrEnum):
|
|
|
65
66
|
return member
|
|
66
67
|
|
|
67
68
|
@classmethod
|
|
68
|
-
def from_code(cls, code: int) ->
|
|
69
|
+
def from_code(cls, code: int) -> Self:
|
|
69
70
|
for member in cls:
|
|
70
71
|
if member.code == code:
|
|
71
72
|
return member
|
|
@@ -83,7 +84,7 @@ class RoborockModeEnum(StrEnum):
|
|
|
83
84
|
return None
|
|
84
85
|
|
|
85
86
|
@classmethod
|
|
86
|
-
def from_value(cls, value: str) ->
|
|
87
|
+
def from_value(cls, value: str) -> Self:
|
|
87
88
|
"""Find enum member by string value (case-insensitive)."""
|
|
88
89
|
for member in cls:
|
|
89
90
|
if member.value.lower() == value.lower():
|
|
@@ -91,7 +92,7 @@ class RoborockModeEnum(StrEnum):
|
|
|
91
92
|
raise ValueError(f"{value} is not a valid value for {cls.__name__}")
|
|
92
93
|
|
|
93
94
|
@classmethod
|
|
94
|
-
def from_name(cls, name: str) ->
|
|
95
|
+
def from_name(cls, name: str) -> Self:
|
|
95
96
|
"""Find enum member by name (case-insensitive)."""
|
|
96
97
|
for member in cls:
|
|
97
98
|
if member.name.lower() == name.lower():
|
|
@@ -186,6 +186,7 @@ async def create_device_manager(
|
|
|
186
186
|
session: aiohttp.ClientSession | None = None,
|
|
187
187
|
ready_callback: DeviceReadyCallback | None = None,
|
|
188
188
|
mqtt_session_unauthorized_hook: SessionUnauthorizedHook | None = None,
|
|
189
|
+
prefer_cache: bool = True,
|
|
189
190
|
) -> DeviceManager:
|
|
190
191
|
"""Convenience function to create and initialize a DeviceManager.
|
|
191
192
|
|
|
@@ -198,6 +199,7 @@ async def create_device_manager(
|
|
|
198
199
|
mqtt_session_unauthorized_hook: Optional hook for MQTT session unauthorized
|
|
199
200
|
events which may indicate rate limiting or revoked credentials. The
|
|
200
201
|
caller may use this to refresh authentication tokens as needed.
|
|
202
|
+
prefer_cache: Whether to prefer cached device data over always fetching it from the API.
|
|
201
203
|
|
|
202
204
|
Returns:
|
|
203
205
|
An initialized DeviceManager with discovered devices.
|
|
@@ -259,5 +261,5 @@ async def create_device_manager(
|
|
|
259
261
|
return dev
|
|
260
262
|
|
|
261
263
|
manager = DeviceManager(web_api, device_creator, mqtt_session=mqtt_session, cache=cache, diagnostics=diagnostics)
|
|
262
|
-
await manager.discover_devices()
|
|
264
|
+
await manager.discover_devices(prefer_cache)
|
|
263
265
|
return manager
|
|
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
|
{python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/data/b01_q10/b01_q10_code_mappings.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/data/b01_q7/b01_q7_code_mappings.py
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
|
{python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/device_features.py
RENAMED
|
File without changes
|
{python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/do_not_disturb.py
RENAMED
|
File without changes
|
{python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/dust_collection_mode.py
RENAMED
|
File without changes
|
{python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/flow_led_status.py
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
|
{python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/smart_wash_params.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_roborock-4.0.2 → python_roborock-4.1.0}/roborock/devices/traits/v1/wash_towel_mode.py
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
|