Skip to content

Commit

Permalink
Merge pull request #471 from yarikoptic/enh-codespell
Browse files Browse the repository at this point in the history
Add codespell and fix typos
  • Loading branch information
Tasshack authored Apr 2, 2024
2 parents 3771ca3 + b4e6ffd commit 3c7a077
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = .git,.codespellrc,translations,resources.py
check-hidden = true
# ignore-regex =
ignore-words-list = hass,aline
23 changes: 23 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Codespell configuration is within .codespellrc
---
name: Codespell

on:
push:
branches: [master]
pull_request:
branches: [master]

permissions:
contents: read

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Codespell
uses: codespell-project/actions-codespell@v2
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ wget -O - https://raw.githubusercontent.com/Tasshack/dreame-vacuum/dev/install |
<a href="https://my.home-assistant.io/redirect/config_flow_start/?domain=dreame_vacuum" target="_blank"><img src="https://my.home-assistant.io/badges/config_flow_start.svg" alt="Open your Home Assistant instance and start setting up a new integration." /></a>
- Select configuration type:

- **Mi Home Acccount**: TODO
- **Mi Home Account**: TODO
- **Dreamehome Account**: TODO
- **Local**: TODO

Expand Down
4 changes: 2 additions & 2 deletions custom_components/dreame_vacuum/dreame/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -2935,7 +2935,7 @@ def set_voice_assistant_language(self, voice_assistant_language: str) -> bool:
or len(voice_assistant_language) < 2
or voice_assistant_language.upper() not in DreameVacuumVoiceAssistantLanguage.__members__
):
raise InvalidActionException(f"Voice assistant language ({voice_assistant_language}) is not suported")
raise InvalidActionException(f"Voice assistant language ({voice_assistant_language}) is not supported")
return self.set_property(
DreameVacuumProperty.VOICE_ASSISTANT_LANGUAGE,
DreameVacuumVoiceAssistantLanguage[voice_assistant_language.upper()],
Expand Down Expand Up @@ -3935,7 +3935,7 @@ def set_auto_switch_property(self, prop: DreameVacuumAutoSwitchProperty, value:
result = self.set_auto_switch_settings({"k": prop.value, "v": int(value)})
if result is None or result[0]["code"] != 0:
_LOGGER.error(
"Auto Swtich Property not updated: %s: %s -> %s",
"Auto Switch Property not updated: %s: %s -> %s",
prop.name,
current_value,
value,
Expand Down
2 changes: 1 addition & 1 deletion docs/map.md
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ Map will be rendered at 1:1 ratio when this option is enabled from configuration

### Low Resolution Map

Low resolution configuration option must be enabled when Home Assistant instace running on a system or container with less than 3GB memory otherwise Home Assistance instance may not start since integration uses a lot of memory for rendering zoomable high resolution images like official APP.
Low resolution configuration option must be enabled when Home Assistant instance running on a system or container with less than 3GB memory otherwise Home Assistance instance may not start since integration uses a lot of memory for rendering zoomable high resolution images like official APP.


### <a href="https://github.com/Tasshack/dreame-vacuum/blob/master/README.md#how-to-use" target="_blank">How to view the map on the dashboard</a>
2 changes: 1 addition & 1 deletion docs/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ Rename a map.
### `dreame_vacuum.vacuum_restore_map`

Restore a map from previous state that are created and uploaded by the device.
> - It is not guaranteed that map recovery will be successfull. Cloud does not store the files forever and recovery files usually be deleted from the cloud after 365 days from the last access.
> - It is not guaranteed that map recovery will be successful. Cloud does not store the files forever and recovery files usually be deleted from the cloud after 365 days from the last access.
> - Cloud connection is required with this service.

**Examples:**
Expand Down

0 comments on commit 3c7a077

Please sign in to comment.