From 29cac5b093443a86044224ed5365fbbb70760840 Mon Sep 17 00:00:00 2001 From: Luke Lashley Date: Tue, 9 Jan 2024 10:48:01 -0500 Subject: [PATCH] Bump Python-Roborock to 0.39.0 (#107547) * bump to 0.39.0 * add new strings * change strings --- homeassistant/components/roborock/__init__.py | 2 +- .../components/roborock/config_flow.py | 2 +- .../components/roborock/manifest.json | 2 +- .../components/roborock/strings.json | 26 +++- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- .../roborock/snapshots/test_diagnostics.ambr | 124 ++++++++++++++++++ 7 files changed, 153 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/roborock/__init__.py b/homeassistant/components/roborock/__init__.py index ff49b352c18..25c1fbb041f 100644 --- a/homeassistant/components/roborock/__init__.py +++ b/homeassistant/components/roborock/__init__.py @@ -8,9 +8,9 @@ import logging from typing import Any from roborock import RoborockException, RoborockInvalidCredentials -from roborock.api import RoborockApiClient from roborock.cloud_api import RoborockMqttClient from roborock.containers import DeviceData, HomeDataDevice, HomeDataProduct, UserData +from roborock.web_api import RoborockApiClient from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_USERNAME diff --git a/homeassistant/components/roborock/config_flow.py b/homeassistant/components/roborock/config_flow.py index 201631f0825..82c513a1b97 100644 --- a/homeassistant/components/roborock/config_flow.py +++ b/homeassistant/components/roborock/config_flow.py @@ -5,7 +5,6 @@ from collections.abc import Mapping import logging from typing import Any -from roborock.api import RoborockApiClient from roborock.containers import UserData from roborock.exceptions import ( RoborockAccountDoesNotExist, @@ -14,6 +13,7 @@ from roborock.exceptions import ( RoborockInvalidEmail, RoborockUrlException, ) +from roborock.web_api import RoborockApiClient import voluptuous as vol from homeassistant import config_entries diff --git a/homeassistant/components/roborock/manifest.json b/homeassistant/components/roborock/manifest.json index c149b9fcf7f..b2567b89abe 100644 --- a/homeassistant/components/roborock/manifest.json +++ b/homeassistant/components/roborock/manifest.json @@ -7,7 +7,7 @@ "iot_class": "local_polling", "loggers": ["roborock"], "requirements": [ - "python-roborock==0.38.0", + "python-roborock==0.39.0", "vacuum-map-parser-roborock==0.1.1" ] } diff --git a/homeassistant/components/roborock/strings.json b/homeassistant/components/roborock/strings.json index 67660816de7..72a1035f5ca 100644 --- a/homeassistant/components/roborock/strings.json +++ b/homeassistant/components/roborock/strings.json @@ -136,7 +136,11 @@ "washing_the_mop": "Washing the mop", "going_to_wash_the_mop": "Going to wash the mop", "charging_complete": "Charging complete", - "device_offline": "Device offline" + "device_offline": "Device offline", + "unknown": "Unknown", + "locked": "Locked", + "air_drying_stopping": "Air drying stopping", + "egg_attack": "Cupid mode" } }, "total_cleaning_time": { @@ -174,7 +178,25 @@ "filter_blocked": "Filter blocked", "invisible_wall_detected": "Invisible wall detected", "cannot_cross_carpet": "Cannot cross carpet", - "internal_error": "Internal error" + "internal_error": "Internal error", + "strainer_error": "Filter is wet or blocked", + "compass_error": "Strong magnetic field detected", + "dock": "Dock not connected to power", + "visual_sensor": "Camera error", + "light_touch": "Wall sensor error", + "collect_dust_error_3": "Clean auto-empty dock", + "collect_dust_error_4": "Auto empty dock voltage error", + "mopping_roller_1": "Wash roller may be jammed", + "mopping_roller_error_2": "Wash roller not lowered properly", + "clear_water_box_hoare": "Check the clean water tank", + "dirty_water_box_hoare": "Check the dirty water tank", + "sink_strainer_hoare": "Reinstall the water filter", + "clear_water_box_exception": "Clean water tank empty", + "clear_brush_exception": "Check that the water filter has been correctly installed", + "clear_brush_exception_2": "Positioning button error", + "filter_screen_exception": "Clean the dock water filter", + "mopping_roller_2": "[%key:component::roborock::entity::sensor::vacuum_error::state::mopping_roller_1%]", + "temperature_protection": "Unit temperature protection" } } }, diff --git a/requirements_all.txt b/requirements_all.txt index 6e22272006d..556d6dc0bc4 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2244,7 +2244,7 @@ python-rabbitair==0.0.8 python-ripple-api==0.0.3 # homeassistant.components.roborock -python-roborock==0.38.0 +python-roborock==0.39.0 # homeassistant.components.smarttub python-smarttub==0.0.36 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index b0191916bda..6b6f77f520c 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1702,7 +1702,7 @@ python-qbittorrent==0.4.3 python-rabbitair==0.0.8 # homeassistant.components.roborock -python-roborock==0.38.0 +python-roborock==0.39.0 # homeassistant.components.smarttub python-smarttub==0.0.36 diff --git a/tests/components/roborock/snapshots/test_diagnostics.ambr b/tests/components/roborock/snapshots/test_diagnostics.ambr index 6d851e41bce..9176e2552ef 100644 --- a/tests/components/roborock/snapshots/test_diagnostics.ambr +++ b/tests/components/roborock/snapshots/test_diagnostics.ambr @@ -36,6 +36,65 @@ 'roborock_device_info': dict({ 'device': dict({ 'activeTime': 1672364449, + 'deviceFeatures': dict({ + 'anyStateTransitGotoSupported': True, + 'avoidCollisionSupported': False, + 'backChargeAutoWashSupported': False, + 'carefulSlowMapSupported': False, + 'carpetDeepCleanSupported': False, + 'carpetShowOnMap': False, + 'carpetSupported': True, + 'cleanRouteFastModeSupported': False, + 'cliffZoneSupported': False, + 'currentMapRestoreEnabled': False, + 'customDoorSillSupported': False, + 'customWaterBoxDistanceSupported': False, + 'downloadTestVoiceSupported': False, + 'dryingSupported': False, + 'dustCollectionSettingSupported': False, + 'eggModeSupported': False, + 'flowLedSettingSupported': False, + 'fwFilterObstacleSupported': True, + 'ignoreUnknownMapObjectSupported': True, + 'mapBeautifyInternalDebugSupported': False, + 'mapCarpetAddSupported': False, + 'mopPathSupported': False, + 'multiMapSegmentTimerSupported': False, + 'newDataForCleanHistory': False, + 'newDataForCleanHistoryDetail': False, + 'offlineMapSupported': False, + 'photoUploadSupported': False, + 'recordAllowed': True, + 'resegmentSupported': False, + 'roomNameSupported': False, + 'rpcRetrySupported': False, + 'setChildSupported': True, + 'shakeMopSetSupported': False, + 'showCleanFinishReasonSupported': True, + 'smartDoorSillSupported': False, + 'stuckZoneSupported': False, + 'supportBackupMap': False, + 'supportCleanEstimate': False, + 'supportCustomDnd': False, + 'supportCustomModeInCleaning': False, + 'supportFloorDirection': False, + 'supportFloorEdit': False, + 'supportFurniture': False, + 'supportIncrementalMap': True, + 'supportQuickMapBuilder': False, + 'supportRemoteControlInCall': False, + 'supportRoomTag': False, + 'supportSetSwitchMapMode': False, + 'supportSetVolumeInCall': True, + 'supportSmartGlobalCleanWithCustomMode': False, + 'supportSmartScene': False, + 'supportedValleyElectricity': False, + 'unsaveMapReasonSupported': False, + 'videoMonitorSupported': True, + 'videoSettingSupported': True, + 'washThenChargeCmdSupported': False, + 'wifiManageSupported': False, + }), 'deviceStatus': dict({ '120': 0, '121': 8, @@ -208,7 +267,9 @@ 'squareMeterCleanArea': 1159.2, }), 'consumable': dict({ + 'cleaningBrushTimeLeft': 1079935, 'cleaningBrushWorkTimes': 65, + 'dustCollectionTimeLeft': 80975, 'dustCollectionWorkTimes': 25, 'filterElementWorkTime': 0, 'filterTimeLeft': 465618, @@ -219,6 +280,7 @@ 'sensorTimeLeft': 33618, 'sideBrushTimeLeft': 645618, 'sideBrushWorkTime': 74382, + 'strainerTimeLeft': 539935, 'strainerWorkTimes': 65, }), 'lastCleanRecord': dict({ @@ -310,6 +372,65 @@ 'roborock_device_info': dict({ 'device': dict({ 'activeTime': 1672364449, + 'deviceFeatures': dict({ + 'anyStateTransitGotoSupported': True, + 'avoidCollisionSupported': False, + 'backChargeAutoWashSupported': False, + 'carefulSlowMapSupported': False, + 'carpetDeepCleanSupported': False, + 'carpetShowOnMap': False, + 'carpetSupported': True, + 'cleanRouteFastModeSupported': False, + 'cliffZoneSupported': False, + 'currentMapRestoreEnabled': False, + 'customDoorSillSupported': False, + 'customWaterBoxDistanceSupported': False, + 'downloadTestVoiceSupported': False, + 'dryingSupported': False, + 'dustCollectionSettingSupported': False, + 'eggModeSupported': False, + 'flowLedSettingSupported': False, + 'fwFilterObstacleSupported': True, + 'ignoreUnknownMapObjectSupported': True, + 'mapBeautifyInternalDebugSupported': False, + 'mapCarpetAddSupported': False, + 'mopPathSupported': False, + 'multiMapSegmentTimerSupported': False, + 'newDataForCleanHistory': False, + 'newDataForCleanHistoryDetail': False, + 'offlineMapSupported': False, + 'photoUploadSupported': False, + 'recordAllowed': True, + 'resegmentSupported': False, + 'roomNameSupported': False, + 'rpcRetrySupported': False, + 'setChildSupported': True, + 'shakeMopSetSupported': False, + 'showCleanFinishReasonSupported': True, + 'smartDoorSillSupported': False, + 'stuckZoneSupported': False, + 'supportBackupMap': False, + 'supportCleanEstimate': False, + 'supportCustomDnd': False, + 'supportCustomModeInCleaning': False, + 'supportFloorDirection': False, + 'supportFloorEdit': False, + 'supportFurniture': False, + 'supportIncrementalMap': True, + 'supportQuickMapBuilder': False, + 'supportRemoteControlInCall': False, + 'supportRoomTag': False, + 'supportSetSwitchMapMode': False, + 'supportSetVolumeInCall': True, + 'supportSmartGlobalCleanWithCustomMode': False, + 'supportSmartScene': False, + 'supportedValleyElectricity': False, + 'unsaveMapReasonSupported': False, + 'videoMonitorSupported': True, + 'videoSettingSupported': True, + 'washThenChargeCmdSupported': False, + 'wifiManageSupported': False, + }), 'deviceStatus': dict({ '120': 0, '121': 8, @@ -482,7 +603,9 @@ 'squareMeterCleanArea': 1159.2, }), 'consumable': dict({ + 'cleaningBrushTimeLeft': 1079935, 'cleaningBrushWorkTimes': 65, + 'dustCollectionTimeLeft': 80975, 'dustCollectionWorkTimes': 25, 'filterElementWorkTime': 0, 'filterTimeLeft': 465618, @@ -493,6 +616,7 @@ 'sensorTimeLeft': 33618, 'sideBrushTimeLeft': 645618, 'sideBrushWorkTime': 74382, + 'strainerTimeLeft': 539935, 'strainerWorkTimes': 65, }), 'lastCleanRecord': dict({