diff --git a/custom_components/dreame_vacuum/const.py b/custom_components/dreame_vacuum/const.py index dc35c6e..3aec62a 100644 --- a/custom_components/dreame_vacuum/const.py +++ b/custom_components/dreame_vacuum/const.py @@ -42,7 +42,6 @@ SERVICE_SET_RESTRICTED_ZONE: Final = "vacuum_set_restricted_zone" SERVICE_MOVE_REMOTE_CONTROL_STEP: Final = "vacuum_remote_control_move_step" SERVICE_RENAME_MAP: Final = "vacuum_rename_map" -SERVICE_RESTORE_MAP: Final = "vacuum_restore_map" SERVICE_SAVE_TEMPORARY_MAP: Final = "vacuum_save_temporary_map" SERVICE_DISCARD_TEMPORARY_MAP: Final = "vacuum_discard_temporary_map" SERVICE_REPLACE_TEMPORARY_MAP: Final = "vacuum_replace_temporary_map" diff --git a/custom_components/dreame_vacuum/services.yaml b/custom_components/dreame_vacuum/services.yaml index 27c968a..68f68f3 100644 --- a/custom_components/dreame_vacuum/services.yaml +++ b/custom_components/dreame_vacuum/services.yaml @@ -217,22 +217,6 @@ vacuum_rename_map: selector: text: -vacuum_restore_map: - target: - entity: - domain: vacuum - fields: - map_id: - example: 14 - required: true - selector: - number: - mode: box - map_url: - required: true - selector: - text: - vacuum_merge_segments: target: entity: diff --git a/custom_components/dreame_vacuum/strings.json b/custom_components/dreame_vacuum/strings.json index 3ccc9f4..6bdf1c5 100644 --- a/custom_components/dreame_vacuum/strings.json +++ b/custom_components/dreame_vacuum/strings.json @@ -48,7 +48,9 @@ "color_scheme": "Map color scheme", "icon_set": "Map icon set", "notify": "Notification", - "map_objects": "Map objects" + "map_objects": "Map objects", + "low_resolution": "Low resolution map", + "square": "Square map" } }, "reauth_confirm": { @@ -65,6 +67,8 @@ "icon_set": "Map icon set", "notify": "Notification", "map_objects": "Map objects", + "low_resolution": "Low resolution map", + "square": "Square map", "configuration_type": "Configuration type", "prefer_cloud": "Prefer cloud connection" } @@ -141,6 +145,14 @@ "low_frequency": "Low Frequency" } }, + "mop_pad_swing": { + "state": { + "off": "Off", + "auto": "Auto", + "daily": "Daily", + "weekly": "Weekly" + } + }, "floor_material": { "state": { "none": "None", @@ -155,6 +167,11 @@ "german": "German", "chinese": "Chinese" } + }, + "order": { + "state": { + "not_set": "Not Set" + } } }, "sensor": { @@ -164,8 +181,8 @@ "sweeping": "Sweeping", "charging": "Charging", "error": "Error", - "idle": "[%key:common::state::idle%]", - "paused": "[%key:common::state::paused%]", + "idle": "Idle", + "paused": "Paused", "returning": "Returning to dock", "mopping": "Mopping", "drying": "Drying", @@ -197,8 +214,8 @@ "status": { "state": { "unknown": "Unknown", - "idle": "[%key:common::state::idle%]", - "paused": "[%key:common::state::paused%]", + "idle": "Idle", + "paused": "Paused", "cleaning": "Cleaning", "returning": "Returning to dock", "spot_cleaning": "Spot cleaning", @@ -255,7 +272,7 @@ "returning_to_remove_mop": "Returning to remove mop" } }, - "mop": { + "water_tank": { "state": { "unknown": "Unknown", "installed": "Installed", @@ -264,7 +281,7 @@ "in_station": "In station" } }, - "water_tank": { + "mop_pad": { "state": { "unknown": "Unknown", "installed": "Installed", @@ -283,7 +300,7 @@ "auto_empty_status": { "state": { "unknown": "Unknown", - "idle": "[%key:common::state::idle%]", + "idle": "Idle", "active": "Active", "not_performed": "Not performed" } @@ -391,7 +408,7 @@ "self_wash_base_status": { "state": { "unknown": "Unknown", - "idle": "[%key:common::state::idle%]", + "idle": "Idle", "washing": "Washing", "drying": "Drying", "paused": "Paused", @@ -414,7 +431,7 @@ "stream_status": { "state": { "unknown": "Unknown", - "idle": "[%key:common::state::idle%]", + "idle": "Idle", "video": "Video", "audio": "Audio", "recording": "Recording" @@ -423,7 +440,7 @@ "drainage_status": { "state": { "unknown": "Unknown", - "idle": "[%key:common::state::idle%]", + "idle": "Idle", "draining": "Draining", "draining_successful": "Draining successful", "draining_failed": "Draining failed" @@ -482,7 +499,15 @@ }, "repeats": { "name": "Repeats", - "description": "Number of cleaning passes for each zone between 1 and 3." + "description": "Number of cleaning passes for every selected zone." + }, + "suction_level": { + "name": "Suction Level", + "description": "Fan speed for every selected zone." + }, + "water_volume": { + "name": "Water Volume", + "description": "Water level for every selected zone." } } }, @@ -526,6 +551,30 @@ } } }, + "vacuum_goto": { + "name": "Go To", + "description": "Go to the coordinate of the map and stop.", + "fields": { + "x": { + "name": "X", + "description": "X Coordinate of the point." + }, + "y": { + "name": "Y", + "description": "Y Coordinate of the point." + } + } + }, + "vacuum_follow_path": { + "name": "Follow Path", + "description": "Follow list of coordinates on the map and return to base. (Only supported on vacuums with camera)", + "fields": { + "points": { + "name": "Points", + "description": "List of coordinates of the path." + } + } + }, "vacuum_remote_control_move_step": { "name": "Remote Control Move Step", "description": "Remotely control move the bot one step.", @@ -626,9 +675,33 @@ "name": "Map ID", "description": "ID of the map to be restored." }, - "map_url": { - "name": "Map URL", - "description": "File Url of the map." + "recovery_map_index": { + "name": "Recovery Map Index", + "description": "Index of the saved recovery map" + } + } + }, + "vacuum_restore_map_from_file": { + "name": "Restore Map From File", + "description": "Restore a map from file.", + "fields": { + "map_id": { + "name": "Map ID", + "description": "ID of the map to be restored." + }, + "file_url": { + "name": "File Url", + "description": "Url of the saved bz2.gz or tar.gz file" + } + } + }, + "vacuum_backup_map": { + "name": "Backup Map", + "description": "Backup a map to cloud.", + "fields": { + "map_id": { + "name": "Map ID", + "description": "ID of the map to be restored." } } }, @@ -680,7 +753,7 @@ }, "vacuum_set_cleaning_sequence": { "name": "Set Cleaning Sequence", - "description": "Set room cleaning sequence.", + "description": "Set room cleaning sequence. (Only on supported devices)", "fields": { "cleaning_sequence": { "name": "Cleanin sequence", @@ -690,7 +763,7 @@ }, "vacuum_set_custom_cleaning": { "name": "Set Custom Cleaning", - "description": "Set custom cleaning parameters.", + "description": "Set custom cleaning parameters. (Only on supported devices)", "fields": { "segment_id": { "name": "Segment ID", @@ -704,6 +777,10 @@ "name": "Water Volume", "description": "Water volume for each room." }, + "cleaning_mode": { + "name": "Cleaning Mode", + "description": "Cleaning for each room (only supported on vacuums with mop pad lifting feature)." + }, "repeats": { "name": "Repeats", "description": "Cleaning times for each room." @@ -738,6 +815,90 @@ } } }, + "vacuum_rename_shortcut": { + "name": "Rename Shortcut", + "description": "Rename a shortcut. (Only on supported devices)", + "fields": { + "shortcut_id": { + "name": "Shortcut ID", + "description": "ID of the shortcut." + }, + "shortcut_name": { + "name": "Shortcut Name", + "description": "New name of the shortcut." + } + } + }, + "vacuum_set_carpet_area": { + "name": "Set Carpet Area", + "description": "Define carpets and ignored carpets. (Only on supported devices)", + "fields": { + "carpets": { + "name": "Carpets", + "description": "Carpet areas." + }, + "ignored_carpets": { + "name": "Ignored Carpets", + "description": "Ignored carpet areas for deleting the automatically detected carpets." + } + } + }, + "vacuum_set_pathway": { + "name": "Set Pathway", + "description": "Define pathways.", + "fields": { + "pathways": { + "name": "Pathways", + "description": "Pathway line coordinates." + } + } + }, + "vacuum_set_predefined_points": { + "name": "Set Predefined Points", + "description": "Define predefined coordinates on current map. (Only supported on vacuums with camera)", + "fields": { + "points": { + "name": "Points", + "description": "List of coordinates to be saved." + } + } + }, + "vacuum_set_obstacle_ignore": { + "name": "Set Obstacle Ignore", + "description": "Set ignore status of an obstacle. (Only supported on vacuums with AI Obstacle detection feature)", + "fields": { + "x": { + "name": "X", + "description": "X Coordinate of the obstacle." + }, + "y": { + "name": "Y", + "description": "Y Coordinate of the obstacle." + }, + "obstacle_type": { + "name": "Obstacle Type", + "description": "Type of the obstacle that will be ignored." + }, + "obstacle_ignored": { + "name": "Obstacle Ignored", + "description": "Obstacle is ignored or not." + } + } + }, + "vacuum_set_router_position": { + "name": "Set router position", + "description": "Set router position on current map. (Only supported on vacuums with WiFi map feature)", + "fields": { + "x": { + "name": "X", + "description": "X Coordinate of the router." + }, + "y": { + "name": "Y", + "description": "Y Coordinate of the router." + } + } + }, "select_select_previous": { "name": "Select Previous", "description": "Select the previous options of an select entity.", diff --git a/custom_components/dreame_vacuum/translations/de.json b/custom_components/dreame_vacuum/translations/de.json index 82d6821..18b9ad0 100644 --- a/custom_components/dreame_vacuum/translations/de.json +++ b/custom_components/dreame_vacuum/translations/de.json @@ -533,6 +533,24 @@ } } }, + "vacuum_set_dnd": { + "name": "Set DnD", + "description": "Enable/disable DnD functionality and/or setting its start and end time.", + "fields": { + "dnd_enabled": { + "name": "DnD Enabled", + "description": "Enable or disable DnD feature." + }, + "dnd_start": { + "name": "DnD Start", + "description": "Start time of DnD feature." + }, + "dnd_end": { + "name": "Dnd End", + "description": "End time of DnD feature." + } + } + }, "vacuum_goto": { "name": "Gehe zu", "description": "Gehe zu den Koordinaten auf der Karte und stoppe.", @@ -649,20 +667,6 @@ } } }, - "vacuum_restore_map": { - "name": "Karte wiederherstellen", - "description": "Stelle eine Karte wieder her.", - "fields": { - "map_id": { - "name": "Karten-ID", - "description": "ID der wiederherzustellenden Karte." - }, - "recovery_map_index": { - "name": "Wiederherstellungskartenindex", - "description": "Index der gespeicherten Wiederherstellungskarte" - } - } - }, "vacuum_restore_map_from_file": { "name": "Karte aus Datei wiederherstellen", "description": "Stellen Sie eine Karte aus einer Datei wieder her.", diff --git a/custom_components/dreame_vacuum/translations/en.json b/custom_components/dreame_vacuum/translations/en.json index a2d96b4..a5e3b75 100644 --- a/custom_components/dreame_vacuum/translations/en.json +++ b/custom_components/dreame_vacuum/translations/en.json @@ -533,6 +533,24 @@ } } }, + "vacuum_set_dnd": { + "name": "Set DnD", + "description": "Enable/disable DnD functionality and/or setting its start and end time.", + "fields": { + "dnd_enabled": { + "name": "DnD Enabled", + "description": "Enable or disable DnD feature." + }, + "dnd_start": { + "name": "DnD Start", + "description": "Start time of DnD feature." + }, + "dnd_end": { + "name": "Dnd End", + "description": "End time of DnD feature." + } + } + }, "vacuum_goto": { "name": "Go To", "description": "Go to the coordinate of the map and stop.", diff --git a/custom_components/dreame_vacuum/translations/fr.json b/custom_components/dreame_vacuum/translations/fr.json index a7cd9e6..d8d7344 100644 --- a/custom_components/dreame_vacuum/translations/fr.json +++ b/custom_components/dreame_vacuum/translations/fr.json @@ -533,6 +533,24 @@ } } }, + "vacuum_set_dnd": { + "name": "Set DnD", + "description": "Enable/disable DnD functionality and/or setting its start and end time.", + "fields": { + "dnd_enabled": { + "name": "DnD Enabled", + "description": "Enable or disable DnD feature." + }, + "dnd_start": { + "name": "DnD Start", + "description": "Start time of DnD feature." + }, + "dnd_end": { + "name": "Dnd End", + "description": "End time of DnD feature." + } + } + }, "vacuum_goto": { "name": "Aller à", "description": "Allez aux coordonnées de la carte et arrêtez-vous.", diff --git a/custom_components/dreame_vacuum/translations/it.json b/custom_components/dreame_vacuum/translations/it.json index b852fe2..71ab3a8 100644 --- a/custom_components/dreame_vacuum/translations/it.json +++ b/custom_components/dreame_vacuum/translations/it.json @@ -533,6 +533,24 @@ } } }, + "vacuum_set_dnd": { + "name": "Set DnD", + "description": "Enable/disable DnD functionality and/or setting its start and end time.", + "fields": { + "dnd_enabled": { + "name": "DnD Enabled", + "description": "Enable or disable DnD feature." + }, + "dnd_start": { + "name": "DnD Start", + "description": "Start time of DnD feature." + }, + "dnd_end": { + "name": "Dnd End", + "description": "End time of DnD feature." + } + } + }, "vacuum_goto": { "name": "Vai a", "description": "Vai alle coordinate della mappa e fermati.", diff --git a/custom_components/dreame_vacuum/translations/pl.json b/custom_components/dreame_vacuum/translations/pl.json index 466fdef..6724679 100644 --- a/custom_components/dreame_vacuum/translations/pl.json +++ b/custom_components/dreame_vacuum/translations/pl.json @@ -533,6 +533,24 @@ } } }, + "vacuum_set_dnd": { + "name": "Set DnD", + "description": "Enable/disable DnD functionality and/or setting its start and end time.", + "fields": { + "dnd_enabled": { + "name": "DnD Enabled", + "description": "Enable or disable DnD feature." + }, + "dnd_start": { + "name": "DnD Start", + "description": "Start time of DnD feature." + }, + "dnd_end": { + "name": "Dnd End", + "description": "End time of DnD feature." + } + } + }, "vacuum_goto": { "name": "Iść do", "description": "Przejdź do współrzędnych mapy i zatrzymaj się.", diff --git a/custom_components/dreame_vacuum/translations/ru.json b/custom_components/dreame_vacuum/translations/ru.json index 8a71be0..e75d39b 100644 --- a/custom_components/dreame_vacuum/translations/ru.json +++ b/custom_components/dreame_vacuum/translations/ru.json @@ -533,6 +533,24 @@ } } }, + "vacuum_set_dnd": { + "name": "Set DnD", + "description": "Enable/disable DnD functionality and/or setting its start and end time.", + "fields": { + "dnd_enabled": { + "name": "DnD Enabled", + "description": "Enable or disable DnD feature." + }, + "dnd_start": { + "name": "DnD Start", + "description": "Start time of DnD feature." + }, + "dnd_end": { + "name": "Dnd End", + "description": "End time of DnD feature." + } + } + }, "vacuum_goto": { "name": "Идти к", "description": "Идите к координате карты и остановитесь.", diff --git a/custom_components/dreame_vacuum/translations/uk.json b/custom_components/dreame_vacuum/translations/uk.json index af4dcbd..bdacaf9 100644 --- a/custom_components/dreame_vacuum/translations/uk.json +++ b/custom_components/dreame_vacuum/translations/uk.json @@ -533,6 +533,24 @@ } } }, + "vacuum_set_dnd": { + "name": "Set DnD", + "description": "Enable/disable DnD functionality and/or setting its start and end time.", + "fields": { + "dnd_enabled": { + "name": "DnD Enabled", + "description": "Enable or disable DnD feature." + }, + "dnd_start": { + "name": "DnD Start", + "description": "Start time of DnD feature." + }, + "dnd_end": { + "name": "Dnd End", + "description": "End time of DnD feature." + } + } + }, "vacuum_goto": { "name": "Йти до", "description": "Перейдіть до координати карти і зупиніться.", diff --git a/custom_components/dreame_vacuum/vacuum.py b/custom_components/dreame_vacuum/vacuum.py index eb5b073..7fbc017 100644 --- a/custom_components/dreame_vacuum/vacuum.py +++ b/custom_components/dreame_vacuum/vacuum.py @@ -68,7 +68,6 @@ SERVICE_REQUEST_MAP, SERVICE_SELECT_MAP, SERVICE_DELETE_MAP, - SERVICE_RESTORE_MAP, SERVICE_SET_CLEANING_SEQUENCE, SERVICE_SET_CUSTOM_CLEANING, SERVICE_SET_DND, @@ -338,15 +337,6 @@ async def async_setup_entry( DreameVacuum.async_rename_map.__name__, ) - platform.async_register_entity_service( - SERVICE_RESTORE_MAP, - { - vol.Required(INPUT_MAP_ID): cv.positive_int, - vol.Required(INPUT_MAP_URL): cv.string, - }, - DreameVacuum.async_restore_map.__name__, - ) - platform.async_register_entity_service( SERVICE_MERGE_SEGMENTS, { @@ -666,16 +656,6 @@ async def async_rename_map(self, map_id, map_name="") -> None: map_name, ) - async def async_restore_map(self, map_id, map_url) -> None: - """Restore a map""" - if map_url and map_url != "": - await self._try_command( - "Unable to call restore_map: %s", - self.device.restore_map, - map_id, - map_url, - ) - async def async_rename_segment(self, segment_id, segment_name="") -> None: """Rename a segment""" if segment_name != "": diff --git a/docs/services.md b/docs/services.md index 354ede2..2b6fa5a 100644 --- a/docs/services.md +++ b/docs/services.md @@ -447,10 +447,6 @@ Rename a map. entity_id: vacuum.vacuum ``` -### `dreame_vacuum.vacuum_restore_map` - -Restore a map from previous state that are created and uploaded by the device. - ### `dreame_vacuum.vacuum_set_restricted_zone` Set invisible walls, no go and no mopping zones on current map.