From 9b7cc088bef8a6974197fb854882acca18489c08 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Mon, 25 Mar 2024 11:32:50 +0100 Subject: [PATCH] Fix spelling [runtime] (#114169) --- homeassistant/components/ezviz/button.py | 4 ++-- homeassistant/components/ezviz/light.py | 4 ++-- homeassistant/components/freebox/home_base.py | 4 ++-- homeassistant/components/lacrosse_view/sensor.py | 12 +++++++----- homeassistant/components/mqtt/lawn_mower.py | 2 +- tests/components/backup/test_manager.py | 4 ++-- tests/components/mqtt/test_lawn_mower.py | 4 ++-- 7 files changed, 18 insertions(+), 16 deletions(-) diff --git a/homeassistant/components/ezviz/button.py b/homeassistant/components/ezviz/button.py index a4c101a81bc..3c89677da09 100644 --- a/homeassistant/components/ezviz/button.py +++ b/homeassistant/components/ezviz/button.py @@ -82,9 +82,9 @@ async def async_setup_entry( async_add_entities( EzvizButtonEntity(coordinator, camera, entity_description) for camera in coordinator.data - for capibility, value in coordinator.data[camera]["supportExt"].items() + for capability, value in coordinator.data[camera]["supportExt"].items() for entity_description in BUTTON_ENTITIES - if capibility == entity_description.supported_ext + if capability == entity_description.supported_ext if value == "1" ) diff --git a/homeassistant/components/ezviz/light.py b/homeassistant/components/ezviz/light.py index 5c33fbee02a..c35b53b47b7 100644 --- a/homeassistant/components/ezviz/light.py +++ b/homeassistant/components/ezviz/light.py @@ -36,8 +36,8 @@ async def async_setup_entry( async_add_entities( EzvizLight(coordinator, camera) for camera in coordinator.data - for capibility, value in coordinator.data[camera]["supportExt"].items() - if capibility == str(SupportExt.SupportAlarmLight.value) + for capability, value in coordinator.data[camera]["supportExt"].items() + if capability == str(SupportExt.SupportAlarmLight.value) if value == "1" ) diff --git a/homeassistant/components/freebox/home_base.py b/homeassistant/components/freebox/home_base.py index ba7cb69fb99..129186fd50b 100644 --- a/homeassistant/components/freebox/home_base.py +++ b/homeassistant/components/freebox/home_base.py @@ -129,9 +129,9 @@ class FreeboxHomeEntity(Entity): if self._remove_signal_update is not None: self._remove_signal_update() - def remove_signal_update(self, dispacher: Callable[[], None]) -> None: + def remove_signal_update(self, dispatcher: Callable[[], None]) -> None: """Register state update callback.""" - self._remove_signal_update = dispacher + self._remove_signal_update = dispatcher def get_value(self, ep_type: str, name: str): """Get the value.""" diff --git a/homeassistant/components/lacrosse_view/sensor.py b/homeassistant/components/lacrosse_view/sensor.py index 1a42aac9109..b2ad9672504 100644 --- a/homeassistant/components/lacrosse_view/sensor.py +++ b/homeassistant/components/lacrosse_view/sensor.py @@ -165,11 +165,13 @@ async def async_setup_entry( message = ( f"Unsupported sensor field: {field}\nPlease create an issue on " "GitHub." - " https://github.com/home-assistant/core/issues/new?assignees=&la" - "bels=&template=bug_report.yml&integration_name=LaCrosse%20View&integrat" - "ion_link=https://www.home-assistant.io/integrations/lacrosse_view/&addi" - f"tional_information=Field:%20{field}%0ASensor%20Model:%20{sensor.model}&" - f"title=LaCrosse%20View%20Unsupported%20sensor%20field:%20{field}" + " https://github.com/home-assistant/core/issues/new?assignees=" + "&labels=&template=bug_report.yml&integration_name=LaCrosse%20View" + "&integration_link=" + "https://www.home-assistant.io/integrations/lacrosse_view/" + "&additional_information=" + f"Field:%20{field}%0ASensor%20Model:%20{sensor.model}" + f"&title=LaCrosse%20View%20Unsupported%20sensor%20field:%20{field}" ) _LOGGER.warning(message) diff --git a/homeassistant/components/mqtt/lawn_mower.py b/homeassistant/components/mqtt/lawn_mower.py index 541ab9e4aa4..e6dc9125583 100644 --- a/homeassistant/components/mqtt/lawn_mower.py +++ b/homeassistant/components/mqtt/lawn_mower.py @@ -174,7 +174,7 @@ class MqttLawnMower(MqttEntity, LawnMowerEntity, RestoreEntity): self._attr_activity = LawnMowerActivity(payload) except ValueError: _LOGGER.error( - "Invalid activity for %s: '%s' (valid activies: %s)", + "Invalid activity for %s: '%s' (valid activities: %s)", self.entity_id, payload, [option.value for option in LawnMowerActivity], diff --git a/tests/components/backup/test_manager.py b/tests/components/backup/test_manager.py index 00581597524..516f8fc1bc4 100644 --- a/tests/components/backup/test_manager.py +++ b/tests/components/backup/test_manager.py @@ -107,11 +107,11 @@ async def test_load_backups_with_exception( """Test loading backups with exception.""" manager = BackupManager(hass) with patch("pathlib.Path.glob", return_value=[TEST_BACKUP.path]), patch( - "tarfile.open", side_effect=OSError("Test ecxeption") + "tarfile.open", side_effect=OSError("Test exception") ): await manager.load_backups() backups = await manager.get_backups() - assert f"Unable to read backup {TEST_BACKUP.path}: Test ecxeption" in caplog.text + assert f"Unable to read backup {TEST_BACKUP.path}: Test exception" in caplog.text assert backups == {} diff --git a/tests/components/mqtt/test_lawn_mower.py b/tests/components/mqtt/test_lawn_mower.py index a95c613cdc4..a258339e9cc 100644 --- a/tests/components/mqtt/test_lawn_mower.py +++ b/tests/components/mqtt/test_lawn_mower.py @@ -731,8 +731,8 @@ async def test_mqtt_payload_not_a_valid_activity_warning( await hass.async_block_till_done() assert ( - "Invalid activity for lawn_mower.test_lawn_mower: 'painting' (valid activies: ['error', 'paused', 'mowing', 'docked'])" - in caplog.text + "Invalid activity for lawn_mower.test_lawn_mower: 'painting' " + "(valid activities: ['error', 'paused', 'mowing', 'docked'])" in caplog.text )